@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ========================================
   AUTH PAGES - LOGIN, REGISTER, CHANGE PASSWORD
   Styling for pages inside /area-riservata/
   ======================================== */

/* Hide site header, footer, and entry on auth pages */
body.cds-auth-page .site-header,
body.cds-auth-page .site-footer,
body.cds-auth-page .site-info,
body.cds-auth-page .entry-header,
body.cds-auth-page .entry-image,
body.cds-auth-page .wp-block-template-part {
    display: none !important;
}

/* Make page full height on auth pages */
body.cds-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
    background: #EEF2F7;
}

body.cds-auth-page,
body.cds-auth-page h1,
body.cds-auth-page h2,
body.cds-auth-page h3,
body.cds-auth-page p,
body.cds-auth-page span,
body.cds-auth-page a,
body.cds-auth-page button,
body.cds-auth-page input,
body.cds-auth-page label {
    font-family: 'Inter', sans-serif !important;
}

/* Customize auth page content area */
body.cds-auth-page .page-content,
body.cds-auth-page .entry-content,
body.cds-auth-page main,
body.cds-auth-page .site-content {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove article padding on auth pages */
body.cds-auth-page article {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* Target the auth wrapper - MOBILE FIRST: 90% di larghezza */
.cds-design-course-auth {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.cds-auth-container {
    width: 90% !important;
    max-width: 90% !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* Style forms on auth pages */
body.cds-auth-page .cds-auth-form,
body.cds-auth-page form {
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    width: 100% !important;
}

/* DESKTOP ONLY: riduce il form a 500px da 768px in su */
@media (min-width: 768px) {
    .cds-auth-container {
        width: 500px !important;
        max-width: 500px !important;
    }
}

/* KREO Logo styling */
.kreo-logo,
.kreo-logo-auth {
    height: auto;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.kreo-logo-img {
    max-width: 120px;
    max-height: 48px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.kreo-logo svg,
.kreo-logo-auth svg {
    width: 120px;
    height: auto;
    max-width: 100%;
}

.kreo-logo svg text,
.kreo-logo-auth svg text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    fill: #2563EB;
}

.kreo-logo svg circle,
.kreo-logo-auth svg circle {
    fill: #2563EB;
    opacity: 0.6;
}

/* ========================================
   DASHBOARD RESPONSIVE - Mobile fixes
   ======================================== */

/* Dashboard wrapper full width - responsive layout */
.cds-dashboard-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Force display flex to override any user agent defaults */
body .cds-dashboard-wrapper,
body .site-content .cds-dashboard-wrapper,
.site-main .cds-dashboard-wrapper {
    display: flex !important;
}

/* Desktop: flex row layout (sidebar + content side-by-side) */
@media (min-width: 900px) {
    .cds-dashboard-wrapper {
        flex-direction: row !important;
        gap: 0 !important;
        align-items: flex-start !important;
    }
}

/* Dashboard sidebar - desktop: fixed width, doesn't shrink */
.cds-dashboard-sidebar {
    flex-shrink: 0 !important;
}

/* Desktop: sidebar stays fixed width */
@media (min-width: 900px) {
    .cds-dashboard-sidebar {
        width: auto !important;
    }
}

/* Dashboard content - expands to fill remaining space */
.cds-dashboard-content {
    flex: 1 !important;
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Main dashboard home container - full width on desktop */
.cds-design-course-home {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Force full width to override any inherited constraints */
.cds-dashboard-wrapper .cds-design-course-home {
    width: 100% !important;
    flex: 1 !important;
}

/* Dashboard content expands to fill remaining space */
.cds-dashboard-content {
    flex: 1 !important;
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Remove padding on dashboard page */
body.cds-dashboard-page .page-content,
body.cds-dashboard-page .entry-content,
body.cds-dashboard-page article {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Dashboard container responsive grid */
.cds-dashboard {
    padding: 20px !important;
    width: 100% !important;
    overflow: visible !important;
}

.cds-dashboard-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: space-between;
}

/* Dashboard cards - responsive sizing */
.cds-dc-category-card {
    width: calc(33.333% - 14px) !important;
    height: 250px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Dashboard category row - remove overflow */
.cds-dc-category-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    width: 100% !important;
    overflow: visible !important;
    overflow-x: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
}

/* Center and style category cards */
.cds-dc-category-row .cds-dc-category-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    margin: 10px auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    width: calc(33.333% - 14px) !important;
}

/* Remove borders from dashboard data boxes */
.cds-dashboard-data,
.cds-dashboard-info,
.cds-dashboard-box,
.cds-info-box {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
    margin: 0 auto !important;
}

/* Center dashboard data content */
.cds-dashboard table,
.cds-dashboard-list,
.cds-data-list {
    margin: 0 auto !important;
    text-align: center !important;
}

/* Tablet: 2 colonne */
@media (max-width: 1024px) {
    .cds-dc-category-card {
        width: calc(50% - 10px) !important;
    }
}

/* Mobile: 1 colonna */
@media (max-width: 768px) {
    .cds-dashboard-categories,
    .cds-dc-category-row {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 10px !important;
    }
    
    .cds-dc-category-card {
        width: 100% !important;
        height: 200px !important;
        font-size: 14px;
    }
    
    /* Dashboard main content padding on mobile */
    .cds-dashboard {
        padding: 15px 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Make tables scrollable on mobile */
    .cds-dashboard table {
        font-size: 12px;
        width: 100%;
        table-layout: auto;
    }
    
    .cds-dashboard table th,
    .cds-dashboard table td {
        padding: 8px 4px !important;
    }
    
    /* Dashboard wrapper mobile */
    body.cds-dashboard-page .site-content,
    body.cds-dashboard-page main {
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Sidebar responsive */
    #cds-dashboard-sidebar {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        padding: 15px 10px !important;
        margin-bottom: 20px !important;
    }
}

/* Hide JavaScript inside dashboard wrapper */
.cds-dashboard-wrapper script,
.cds-dashboard-wrapper script[type="text/javascript"],
.cds-dashboard-main script {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Hide any visible JavaScript code */
pre, code, script:not([src]) {
    display: none !important;
    visibility: hidden !important;
}

/* Hide inline scripts completely */
script {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* Additional safety for any visible text in footer */
.site-footer script,
footer script {
    display: none !important;
}
