/**
 * CTE Employer Engagement Menu
 * Extends the VVUSD UI Library for CTE-specific layouts
 */

/* ======================
   CTE CUSTOM PROPERTIES
   ====================== */
:root {
    --cte-navy: #1e3a8a;
    --cte-navy-dark: #172e6e;
    --cte-gold: #eab308;
    --cte-gold-dark: #ca9a06;

    --cte-awareness: #F58220;
    --cte-awareness-light: rgba(245, 130, 32, 0.08);
    --cte-awareness-border: rgba(245, 130, 32, 0.25);

    --cte-exploration: #94C11F;
    --cte-exploration-light: rgba(148, 193, 31, 0.08);
    --cte-exploration-border: rgba(148, 193, 31, 0.25);

    --cte-preparation: #009ACD;
    --cte-preparation-light: rgba(0, 154, 205, 0.08);
    --cte-preparation-border: rgba(0, 154, 205, 0.25);

    --cte-mentorship: #FDB913;
    --cte-mentorship-light: rgba(253, 185, 19, 0.08);
    --cte-mentorship-border: rgba(253, 185, 19, 0.25);
}

/* ======================
   CTE PAGE LAYOUT
   ====================== */
.cte-page {
    min-height: 100vh;
    padding: var(--space-8) var(--space-4);
    background: var(--main-bg);
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(30, 58, 138, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 100%, rgba(234, 179, 8, 0.04) 0%, transparent 50%);
}

.cte-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* ======================
   CTE HEADER
   ====================== */
.cte-header {
    background: var(--cte-navy);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--space-10) var(--space-12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
    border-bottom: 4px solid var(--cte-gold);
    position: relative;
    overflow: hidden;
}

.cte-header::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cte-header-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.cte-header-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.cte-header-tag-line {
    display: inline-block;
    width: 32px;
    height: 3px;
    background: var(--cte-gold);
    border-radius: var(--radius-full);
}

.cte-header-tag-text {
    font-size: 0.625rem;
    font-weight: var(--font-weight-bold);
    color: var(--cte-gold);
    text-transform: uppercase;
    letter-spacing: 0.3em;
}

.cte-header h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: white;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.cte-header h1 span {
    color: var(--cte-gold);
}

.cte-header-subtitle {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: rgba(191, 219, 254, 0.8);
    letter-spacing: 0.1em;
}

.cte-header-logo {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.cte-logo-box {
    background: white;
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-5) var(--space-1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cte-logo-img {
    height: 64px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ======================
   CTE FORM CARD
   ====================== */
.cte-form-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    backdrop-filter: saturate(1.2) blur(var(--glass-blur));
    -webkit-backdrop-filter: saturate(1.2) blur(var(--glass-blur));
    box-shadow: var(--shadow-xl);
    isolation: isolate;
    overflow: hidden;
}

.cte-form-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 0;
    pointer-events: none;
}

.cte-form-card > * {
    position: relative;
    z-index: 2;
}

/* ======================
   BUSINESS PROFILE SECTION
   ====================== */
.cte-profile-section {
    padding: var(--space-10) var(--space-12);
    border-bottom: 1px solid var(--border-color);
}

.cte-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.cte-section-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 138, 0.06);
    border-radius: var(--radius-md);
    color: var(--cte-navy);
    flex-shrink: 0;
}

.cte-section-icon svg {
    width: 22px;
    height: 22px;
}

.cte-section-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--cte-navy);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
}

.cte-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.cte-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cte-field-label {
    font-size: 0.625rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.cte-field-input {
    width: 100%;
    padding: var(--space-4);
    background: var(--main-bg);
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    font-weight: var(--font-weight-semibold);
    color: var(--cte-navy);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.cte-field-input:focus {
    outline: none;
    border-color: var(--cte-navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    background: white;
}

.cte-field-input::placeholder {
    color: var(--text-muted);
    font-weight: var(--font-weight-normal);
}

/* ======================
   ENGAGEMENT MENU GRID
   ====================== */
.cte-menu-section {
    padding: var(--space-2);
    background: rgba(229, 231, 235, 0.5);
}

.cte-category {
    display: flex;
    gap: 2px;
    margin-bottom: 2px;
}

.cte-category:last-child {
    margin-bottom: 0;
}

/* Category Sidebar Label */
.cte-category-label {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.cte-category-label span {
    color: white;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    white-space: nowrap;
}

.cte-category-label--awareness { background: var(--cte-awareness); }
.cte-category-label--exploration { background: var(--cte-exploration); }
.cte-category-label--preparation { background: var(--cte-preparation); }
.cte-category-label--mentorship { background: var(--cte-mentorship); }

/* Items Grid */
.cte-items-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

/* ======================
   ENGAGEMENT CARD
   ====================== */
.cte-engagement-card {
    background: white;
    padding: var(--space-6);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    border-left: 4px solid transparent;
    min-height: 180px;
}

.cte-engagement-card:hover {
    background: var(--main-bg);
}

/* Selected States by Category */
.cte-engagement-card.selected[data-category="awareness"] {
    background: var(--cte-awareness-light);
    border-left-color: var(--cte-awareness);
}

.cte-engagement-card.selected[data-category="exploration"] {
    background: var(--cte-exploration-light);
    border-left-color: var(--cte-exploration);
}

.cte-engagement-card.selected[data-category="preparation"] {
    background: var(--cte-preparation-light);
    border-left-color: var(--cte-preparation);
}

.cte-engagement-card.selected[data-category="mentorship"] {
    background: var(--cte-mentorship-light);
    border-left-color: var(--cte-mentorship);
}

/* Card Header */
.cte-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.cte-card-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
}

/* Checkbox Indicator */
.cte-card-check {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.cte-engagement-card:hover .cte-card-check {
    border-color: var(--text-muted);
}

.cte-engagement-card.selected .cte-card-check {
    border-color: transparent;
}

.cte-engagement-card.selected[data-category="awareness"] .cte-card-check { background: var(--cte-awareness); }
.cte-engagement-card.selected[data-category="exploration"] .cte-card-check { background: var(--cte-exploration); }
.cte-engagement-card.selected[data-category="preparation"] .cte-card-check { background: var(--cte-preparation); }
.cte-engagement-card.selected[data-category="mentorship"] .cte-card-check { background: var(--cte-mentorship); }

.cte-card-check svg {
    width: 14px;
    height: 14px;
    color: white;
    display: none;
}

.cte-engagement-card.selected .cte-card-check svg {
    display: block;
}

/* Card Meta */
.cte-card-meta {
    font-size: 0.625rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    transition: color var(--transition-base);
}

.cte-engagement-card.selected[data-category="awareness"] .cte-card-meta { color: var(--cte-awareness); }
.cte-engagement-card.selected[data-category="exploration"] .cte-card-meta { color: var(--cte-exploration); }
.cte-engagement-card.selected[data-category="preparation"] .cte-card-meta { color: var(--cte-preparation); }
.cte-engagement-card.selected[data-category="mentorship"] .cte-card-meta { color: var(--cte-mentorship); }

/* Card Description */
.cte-card-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0;
}

/* Grid Filler */
.cte-grid-filler {
    background: rgba(255, 255, 255, 0.3);
}

/* ======================
   GRADE PICKER
   ====================== */
.cte-grade-picker {
    margin-top: auto;
    padding-top: var(--space-4);
    display: none;
    animation: fadeSlideUp 0.25s ease;
}

.cte-engagement-card.selected .cte-grade-picker {
    display: block;
}

.cte-grade-picker-inner {
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.cte-grade-picker-label {
    font-size: 0.625rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
    letter-spacing: 0.05em;
}

.cte-engagement-card[data-category="awareness"] .cte-grade-picker-label { color: var(--cte-awareness); }
.cte-engagement-card[data-category="exploration"] .cte-grade-picker-label { color: var(--cte-exploration); }
.cte-engagement-card[data-category="preparation"] .cte-grade-picker-label { color: var(--cte-preparation); }
.cte-engagement-card[data-category="mentorship"] .cte-grade-picker-label { color: var(--cte-mentorship); }

.cte-grade-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.cte-grade-btn {
    padding: var(--space-1) var(--space-3);
    font-size: 0.625rem;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    line-height: 1.4;
}

.cte-grade-btn:hover {
    opacity: 0.8;
}

/* Selected grade buttons by category */
.cte-grade-btn.selected[data-category="awareness"] {
    background: var(--cte-awareness);
    border-color: transparent;
    color: white;
}
.cte-grade-btn.selected[data-category="exploration"] {
    background: var(--cte-exploration);
    border-color: transparent;
    color: white;
}
.cte-grade-btn.selected[data-category="preparation"] {
    background: var(--cte-preparation);
    border-color: transparent;
    color: white;
}
.cte-grade-btn.selected[data-category="mentorship"] {
    background: var(--cte-mentorship);
    border-color: transparent;
    color: white;
}

/* Unselected but category-colored */
.cte-grade-btn[data-category="awareness"] {
    border-color: var(--cte-awareness-border);
    color: var(--cte-awareness);
}
.cte-grade-btn[data-category="exploration"] {
    border-color: var(--cte-exploration-border);
    color: var(--cte-exploration);
}
.cte-grade-btn[data-category="preparation"] {
    border-color: var(--cte-preparation-border);
    color: var(--cte-preparation);
}
.cte-grade-btn[data-category="mentorship"] {
    border-color: var(--cte-mentorship-border);
    color: var(--cte-mentorship);
}

/* ======================
   OTHER IDEAS TEXTAREA
   ====================== */
.cte-other-textarea {
    margin-top: auto;
    padding-top: var(--space-4);
    display: none;
    animation: fadeSlideUp 0.25s ease;
}

.cte-engagement-card.selected .cte-other-textarea {
    display: block;
}

.cte-other-textarea textarea {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--font-size-sm);
    border: 2px solid var(--cte-mentorship-border);
    border-radius: var(--radius);
    font-family: inherit;
    resize: none;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    transition: border-color var(--transition-base);
}

.cte-other-textarea textarea:focus {
    outline: none;
    border-color: var(--cte-mentorship);
    box-shadow: 0 0 0 3px rgba(253, 185, 19, 0.12);
}

.cte-other-textarea textarea::placeholder {
    font-style: italic;
    color: var(--text-muted);
}

/* ======================
   SUBMIT FOOTER
   ====================== */
.cte-footer {
    padding: var(--space-12);
    text-align: center;
    background: var(--main-bg);
    border-top: 2px solid var(--border-color);
}

.cte-footer h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-4);
}

.cte-footer p {
    max-width: 560px;
    margin: 0 auto var(--space-10);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-relaxed);
}

.cte-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-12);
    background: var(--cte-navy);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
}

.cte-submit-btn:hover {
    background: var(--cte-awareness);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.cte-submit-btn:active {
    transform: scale(0.97);
}

.cte-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cte-submit-btn svg {
    width: 22px;
    height: 22px;
}

/* ======================
   SUCCESS STATE
   ====================== */
.cte-success {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

.cte-success.active {
    display: flex;
}

.cte-success-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: saturate(1.2) blur(var(--glass-blur));
    -webkit-backdrop-filter: saturate(1.2) blur(var(--glass-blur));
    box-shadow: var(--shadow-xl);
    isolation: isolate;
    padding: var(--space-12);
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.cte-success-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #fff;
    z-index: 0;
    pointer-events: none;
}

.cte-success-card > * {
    position: relative;
    z-index: 2;
}

.cte-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s ease;
}

.cte-success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-secondary);
}

.cte-success-card h2 {
    font-size: var(--font-size-3xl);
    color: var(--cte-navy);
    margin-bottom: var(--space-4);
}

.cte-success-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-8);
}

.cte-reset-btn {
    width: 100%;
    padding: var(--space-4);
    background: var(--cte-navy);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.cte-reset-btn:hover {
    background: var(--text-secondary);
}

/* ======================
   VALIDATION ERROR
   ====================== */
.cte-field-error {
    font-size: var(--font-size-xs);
    color: var(--color-danger);
    margin-top: var(--space-1);
    display: none;
}

.cte-field-error.visible {
    display: block;
    animation: fadeSlideUp 0.2s ease;
}

.cte-field-input.error {
    border-color: var(--color-danger);
}

.cte-field-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ======================
   SURVEY FOOTER
   ====================== */
.cte-page-footer {
    text-align: center;
    margin-top: var(--space-8);
    padding-bottom: var(--space-8);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ======================
   RESPONSIVE - Tablet
   ====================== */
@media (max-width: 1024px) {
    .cte-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cte-page {
        padding: var(--space-4) var(--space-2);
    }

    .cte-header {
        flex-direction: column;
        text-align: center;
        padding: var(--space-6) var(--space-5);
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .cte-header h1 {
        font-size: var(--font-size-2xl);
    }

    .cte-header-tag {
        justify-content: center;
    }

    .cte-profile-section {
        padding: var(--space-6) var(--space-5);
    }

    .cte-input-grid {
        grid-template-columns: 1fr;
    }

    .cte-category {
        flex-direction: column;
    }

    .cte-category-label {
        width: 100%;
        padding: var(--space-3);
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }

    .cte-category-label span {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .cte-items-grid {
        grid-template-columns: 1fr;
    }

    .cte-engagement-card {
        min-height: auto;
        padding: var(--space-5);
    }

    .cte-footer {
        padding: var(--space-8) var(--space-5);
    }

    .cte-submit-btn {
        font-size: var(--font-size-base);
        padding: var(--space-4) var(--space-8);
    }

    .cte-form-card {
        border-radius: 0 0 var(--radius) var(--radius);
    }
}

@media (max-width: 380px) {
    .cte-header h1 {
        font-size: var(--font-size-xl);
    }

    .cte-section-title {
        font-size: var(--font-size-lg);
    }

    .cte-engagement-card {
        padding: var(--space-4);
    }

    .cte-card-title {
        font-size: var(--font-size-base);
    }
}

/* ======================
   REDUCE MOTION
   ====================== */
@media (prefers-reduced-motion: reduce) {
    .cte-grade-picker,
    .cte-other-textarea {
        animation: none;
    }

    .cte-submit-btn:hover {
        transform: none;
    }

    .cte-success-icon {
        animation: none;
    }
}
