/* ================================================
   CV Manager - Common Styles
   Color scheme from client design
   ================================================ */

/* ================================================
   THEME ISOLATION - Prevent any theme from
   overriding plugin fonts, colors, buttons, etc.
   Uses body prefix for higher specificity.
   ================================================ */

/* Reset all CVM elements - kill theme inheritance */
body [class*="cvm-"] {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Font isolation - themes often set body font globally */
body .cvm-hero,
body .cvm-templates,
body .cvm-how-it-works,
body .cvm-pricing,
body .cvm-faq,
body .cvm-contact,
body .cvm-cv-form-wrapper,
body .cvm-dashboard,
body .cvm-auth-page,
body .cvm-auth-menu,
body .cvm-nav {
    font-family: var(--cvm-font-body) !important;
    line-height: 1.5;
    color: var(--cvm-gray-800);
    letter-spacing: normal;
    text-transform: none;
    word-spacing: normal;
}

/* Heading isolation */
body [class*="cvm-"] h1,
body [class*="cvm-"] h2,
body [class*="cvm-"] h3,
body [class*="cvm-"] h4,
body [class*="cvm-"] h5,
body [class*="cvm-"] h6 {
    font-family: var(--cvm-font-display) !important;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-top: 0;
    text-transform: none;
    word-spacing: normal;
}

/* Paragraph / text isolation */
body [class*="cvm-"] p {
    font-family: var(--cvm-font-body) !important;
    margin-top: 0;
    line-height: 1.7;
}

/* Link isolation - themes love to force link colors */
body [class*="cvm-"] a:not(.cvm-btn) {
    text-decoration: none;
    transition: color 0.2s;
}

/* Button isolation - prevent theme button styles bleeding in */
body .cvm-btn {
    font-family: var(--cvm-font-body) !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    outline: none;
    box-sizing: border-box;
}
body .cvm-btn:hover,
body .cvm-btn:focus,
body .cvm-btn:active {
    text-decoration: none !important;
    outline: none;
}
body .cvm-btn-primary {
    color: #fff !important;
    background: var(--cvm-accent, var(--cvm-blue-500)) !important;
}
body .cvm-btn-primary:hover,
body .cvm-btn-primary:focus {
    color: #fff !important;
}
body .cvm-btn-secondary {
    color: var(--cvm-blue-600) !important;
}

/* Input isolation - themes override form styles aggressively */
body [class*="cvm-"] input[type="text"],
body [class*="cvm-"] input[type="email"],
body [class*="cvm-"] input[type="password"],
body [class*="cvm-"] input[type="tel"],
body [class*="cvm-"] input[type="url"],
body [class*="cvm-"] input[type="number"],
body [class*="cvm-"] input[type="date"],
body [class*="cvm-"] textarea,
body [class*="cvm-"] select {
    font-family: var(--cvm-font-body) !important;
    font-size: 0.9rem;
    color: var(--cvm-blue-900);
    border: 1.5px solid var(--cvm-gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    background: var(--cvm-white);
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body [class*="cvm-"] input:focus,
body [class*="cvm-"] textarea:focus,
body [class*="cvm-"] select:focus {
    outline: none;
    border-color: var(--cvm-blue-400);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
body [class*="cvm-"] input::placeholder,
body [class*="cvm-"] textarea::placeholder {
    color: var(--cvm-gray-400);
    font-family: var(--cvm-font-body) !important;
}

/* Label isolation */
body [class*="cvm-"] label {
    font-family: var(--cvm-font-body) !important;
    font-weight: 600;
    color: var(--cvm-gray-600);
}

/* List isolation - themes add bullets/padding */
body [class*="cvm-"] ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Image isolation */
body [class*="cvm-"] img {
    max-width: 100%;
    height: auto;
    border: none;
    box-shadow: none;
}

/* Section label isolation */
body .cvm-section-label {
    font-family: var(--cvm-font-body) !important;
}

/* ================================================
   END THEME ISOLATION
   ================================================ */

:root {
    --cvm-blue-900: #0a1628;
    --cvm-blue-800: #0f2044;
    --cvm-blue-700: #1a3a6e;
    --cvm-blue-600: #1d4ed8;
    --cvm-blue-500: #2563eb;
    --cvm-blue-400: #3b82f6;
    --cvm-blue-300: #93c5fd;
    --cvm-blue-200: #bfdbfe;
    --cvm-blue-100: #dbeafe;
    --cvm-blue-50:  #eff6ff;
    --cvm-white: #ffffff;
    --cvm-gray-50: #f8fafc;
    --cvm-gray-100: #f1f5f9;
    --cvm-gray-200: #e2e8f0;
    --cvm-gray-400: #94a3b8;
    --cvm-gray-600: #475569;
    --cvm-gray-800: #1e293b;
    --cvm-font-display: 'Bricolage Grotesque', sans-serif;
    --cvm-font-body: 'DM Sans', sans-serif;
    --cvm-radius: 16px;
    --cvm-radius-sm: 10px;
    --cvm-shadow: 0 4px 24px rgba(37,99,235,0.10);
    --cvm-shadow-lg: 0 12px 48px rgba(37,99,235,0.18);
    --cvm-accent: #2563eb;
    --cvm-accent-light: #60a5fa;
}

/* CookieAdmin floating re-consent button - replace broken image with cookie icon */
button.cookieadmin_re_consent {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--cvm-blue-500) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    position: fixed !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
}
/* Hide the broken image */
button.cookieadmin_re_consent img.cookieadmin_reconsent_img {
    display: none !important;
}
/* Show a cookie emoji icon instead */
button.cookieadmin_re_consent::after {
    content: '\1F36A';
    font-size: 22px;
    line-height: 1;
}
/* Hide on tablet and mobile to prevent overlap */
@media (max-width: 1024px) {
    button.cookieadmin_re_consent {
        display: none !important;
    }
}

/* Section Header */
body .cvm-section-header { text-align: center; margin-bottom: 56px; }
body .cvm-section-label {
    font-size: 0.78rem !important; font-weight: 700 !important; letter-spacing: 2.5px !important;
    text-transform: uppercase !important; color: var(--cvm-accent, var(--cvm-blue-500)) !important;
    margin-bottom: 16px;
    font-family: var(--cvm-font-body) !important;
}
body .cvm-section-title {
    font-family: var(--cvm-font-display) !important;
    font-size: clamp(1.9rem, 3vw, 2.8rem) !important;
    font-weight: 800 !important; color: var(--cvm-blue-900) !important;
    letter-spacing: -1px !important; margin-bottom: 14px;
}
body .cvm-section-sub {
    color: var(--cvm-gray-600) !important;
    font-size: 1rem !important; max-width: 560px;
    margin: 0 auto; line-height: 1.7 !important;
    font-family: var(--cvm-font-body) !important;
}

/* Buttons */
body .cvm-btn {
    display: inline-flex !important; align-items: center; gap: 10px;
    font-family: var(--cvm-font-body) !important;
    font-size: 0.95rem !important; font-weight: 600 !important;
    text-decoration: none !important; border: none;
    border-radius: 50px !important; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    line-height: 1 !important;
}

body .cvm-btn-primary {
    background: var(--cvm-accent, var(--cvm-blue-500)) !important; color: #fff !important;
    padding: 14px 28px !important;
    box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}
body .cvm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37,99,235,0.42);
    color: #fff !important;
}

body .cvm-btn-secondary {
    background: var(--cvm-white) !important; color: var(--cvm-blue-600) !important;
    padding: 14px 28px !important;
    border: 1.5px solid var(--cvm-blue-200) !important;
}
body .cvm-btn-secondary:hover {
    background: var(--cvm-blue-50) !important;
    border-color: var(--cvm-blue-400) !important;
}

body .cvm-btn-ghost {
    background: transparent !important; color: var(--cvm-gray-600) !important;
    padding: 14px 20px !important;
    font-size: 0.875rem !important; font-weight: 500 !important;
}
body .cvm-btn-ghost:hover { color: var(--cvm-blue-500) !important; }

/* Scroll Reveal Animation */
.cvm-reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.cvm-reveal.cvm-visible { opacity: 1; transform: translateY(0); }

/* Elementor editor: show all reveal elements immediately */
.elementor-editor-active .cvm-reveal { opacity: 1 !important; transform: translateY(0) !important; }

/* Spinner */
.cvm-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--cvm-blue-100);
    border-top-color: var(--cvm-blue-500);
    border-radius: 50%;
    animation: cvmSpin 0.7s linear infinite;
    margin: 0 auto;
}
@keyframes cvmSpin { to { transform: rotate(360deg); } }

/* Status spinner for success page */
.cvm-success-page { text-align: center; padding: 60px 20px; }
.cvm-success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.cvm-success-page h2 { font-family: var(--cvm-font-display); font-size: 1.8rem; color: var(--cvm-blue-900); margin-bottom: 12px; }
.cvm-success-page p { color: var(--cvm-gray-600); line-height: 1.7; }
.cvm-success-status { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--cvm-gray-600); }

.cvm-message { padding: 16px 24px; border-radius: var(--cvm-radius-sm); margin-bottom: 20px; }
.cvm-message-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cvm-message-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Layout Width Classes */
.cvm-section-inner {
    max-width: 100%; margin: 0 auto; width: 100%;
}
.cvm-width-boxed .cvm-section-inner { max-width: 1200px; }
.cvm-width-narrow .cvm-section-inner { max-width: 1000px; }

/* Sections - common padding */
body .cvm-templates,
body .cvm-how-it-works,
body .cvm-pricing,
body .cvm-faq,
body .cvm-contact,
body .cvm-cv-form-wrapper {
    padding: 80px 5% !important;
    position: relative;
    font-family: var(--cvm-font-body) !important;
}

/* Mobile: reduce section spacing & header margins */
@media (max-width: 768px) {
    body .cvm-templates,
    body .cvm-how-it-works,
    body .cvm-pricing,
    body .cvm-faq,
    body .cvm-contact,
    body .cvm-cv-form-wrapper {
        padding: 48px 4% !important;
    }
    body .cvm-section-header {
        margin-bottom: 32px;
    }
    body .cvm-section-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    body .cvm-section-sub {
        font-size: 0.9rem !important;
    }
}
@media (max-width: 480px) {
    body .cvm-templates,
    body .cvm-how-it-works,
    body .cvm-pricing,
    body .cvm-faq,
    body .cvm-contact,
    body .cvm-cv-form-wrapper {
        padding: 36px 3.5% !important;
    }
    body .cvm-section-header {
        margin-bottom: 24px;
    }
}
