/* =========================================================
   MASTER'S COLLEGE SURVEY
   STYLES.CSS
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --mc-purple: #550F78;
    --mc-magenta: #960F7D;
    --mc-yellow: #FFCC00;
    --mc-black: #111111;

    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --border: #E7E7E7;
    --text-light: #666666;

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;

    --shadow-sm:
        0 2px 8px rgba(0,0,0,.05);

    --shadow-md:
        0 8px 24px rgba(0,0,0,.08);

    --shadow-lg:
        0 20px 50px rgba(0,0,0,.10);

    --transition:
        0.25s ease;

    --max-width: 1140px;
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    margin: 0;

    font-family: 'Inter', sans-serif;

    background: var(--bg);

    color: var(--mc-black);

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   APP
========================================================= */

#app {

    max-width: var(--max-width);

    margin: auto;

    padding:
        40px
        24px
        100px;
}


/* =========================================================
   HERO
========================================================= */

.hero {

    text-align: center;

    padding:
        80px 20px;
}

.logo {

    width: 260px;

    max-width: 100%;

    margin-bottom: 40px;
}

.hero h1 {

    font-family: 'Nunito', sans-serif;

    font-size: clamp(
        2rem,
        5vw,
        3.5rem
    );

    color: var(--mc-purple);

    margin-bottom: 20px;
}

.hero p {

    max-width: 1140px;

    margin: auto;

    padding-bottom: 10px;

    color: var(--text-light);

    font-size: 1.05rem;
}


/* =========================================================
   BUTTONS
========================================================= */

button {

    border: none;

    cursor: pointer;

    font-family: inherit;
}

.btn-primary {

    background: var(--mc-purple);

    color: white;

    padding:
        16px
        28px;

    border-radius:
        var(--radius-sm);

    margin-top: 32px;

    font-size: 1rem;

    font-weight: 600;

    transition:
        var(--transition);
}

.btn-primary:hover {

    transform:
        translateY(-2px);

    box-shadow:
        var(--shadow-md);
}

.btn-primary:active {

    transform:
        translateY(0);
}

.btn-primary:disabled {

    opacity: .7;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;

}

.btn-secondary {

    background: white;

    color: var(--mc-purple);

    padding:
        16px
        28px;

    border:
        2px solid
        var(--mc-purple);

    border-radius:
        var(--radius-sm);

    margin-top: 32px;

    font-size: 1rem;

    font-weight: 600;

    transition:
        var(--transition);

    cursor:
        pointer;

}

.btn-secondary:hover {

    background:
        rgba(85,15,120,.06);

    transform:
        translateY(-2px);

    box-shadow:
        var(--shadow-sm);

}

.btn-secondary:active {

    transform:
        translateY(0);

}

.btn-secondary:focus-visible {

    outline:
        3px solid
        rgba(255,204,0,.5);

    outline-offset:
        2px;

}

.navigation-buttons {

    display: flex;

    justify-content: space-between;

    gap: 16px;

    margin-top: 32px;

}


/* =========================================================
   SCREEN
========================================================= */

.screen {

    animation:
        fadeIn .35s ease;
}

@keyframes fadeIn {

    from {

        opacity: 0;

        transform:
            translateY(12px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   PROGRESS BAR
========================================================= */

.progress-wrapper {

    width: 100%;

    height: 10px;

    background: #ECECEC;

    border-radius: 999px;

    overflow: hidden;

    margin-bottom: 50px;
}

#progressBar {

    height: 100%;

    width: 0%;

    background:
        linear-gradient(
            90deg,
            var(--mc-purple),
            var(--mc-magenta)
        );

    transition:
        width .4s ease;
}


/* =========================================================
   SECTION TITLES
========================================================= */

.section-title {

    font-family:
        'Nunito',
        sans-serif;

    font-size:
        clamp(
            1.8rem,
            3vw,
            2.5rem
        );

    margin-bottom:
        12px;
}

.section-subtitle {

    color:
        var(--text-light);

    margin-bottom:
        40px;
}


/* =========================================================
   COURSE CARDS
========================================================= */

.cards-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                220px,
                1fr
            )
        );

    gap: 18px;
}

.option-card {

    background: var(--surface);

    border: 2px solid var(--border);

    border-radius: var(--radius-md);

    padding: 24px;

    min-height: 120px;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    transition: var(--transition);

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .15s ease;

}

.option-card:hover {

    border-color:
        var(--mc-purple);

    box-shadow:
        var(--shadow-md);

    transform:
        translateY(-2px);
}

.option-card.selected {

    background:
        var(--mc-purple);

    color:
        white;

    border-color:
        var(--mc-purple);

    box-shadow:
        0 8px 24px rgba(
            85,
            15,
            120,
            .25
        );

}


/* =========================================================
   CHECKBOX PROFESSORS
========================================================= */

.teacher-list {

    display: grid;

    gap: 12px;
}

.teacher-item {

    display: flex;

    align-items: center;

    gap: 14px;

    padding:
        18px;

    background:
        white;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-sm);
}

.teacher-item input {

    width: 20px;

    height: 20px;

    accent-color:
        var(--mc-purple);
}


/* =========================================================
   MATRIX TABLE
========================================================= */

.rating-matrix {

    background:
        white;

    border-radius:
        var(--radius-md);

    padding:
        30px;

    box-shadow:
        var(--shadow-sm);

    overflow-x:
        auto;
}

.rating-header {

    display: grid;

    grid-template-columns:
        1fr
        repeat(5,60px);

    margin-bottom:
        20px;

    font-weight:
        600;

    text-align: center;
}

.rating-row {

    display: grid;

    grid-template-columns:
        1fr
        repeat(5,60px);

    align-items:
        center;

    min-height:
        60px;

    border-top:
        1px solid
        #EFEFEF;
}

.rating-question {

    padding-right:
        20px;
}

.rating-cell {

    text-align:
        center;
}

.rating-cell input {

    width:
        18px;

    height:
        18px;

    accent-color:
        var(--mc-purple);
}


/* =========================================================
   NPS
========================================================= */

.nps-grid {

    display: grid;

    grid-template-columns:
        repeat(
            11,
            1fr
        );

    gap: 10px;
}

.nps-btn {

    height: 52px;

    border-radius:
        12px;

    background:
        white;

    border:
        2px solid
        var(--border);

    font-weight:
        600;

    transition:
        var(--transition);

    transition:
        all .15s ease;
}

.nps-btn:hover {

    border-color:
        var(--mc-purple);

    transform:
        translateY(-2px);
}

.nps-btn.selected {

    background:
        var(--mc-purple);

    color:
        white;

    border-color:
        var(--mc-purple);

    box-shadow:
        0 8px 24px rgba(
            85,
            15,
            120,
            .25
        );
}


/* =========================================================
   TEXTAREA
========================================================= */

textarea {

    width: 100%;

    min-height: 180px;

    resize: vertical;

    padding:
        18px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-md);

    font-family:
        inherit;

    font-size:
        1rem;
}

textarea:focus {

    outline: none;

    border-color:
        var(--mc-purple);
}


/* =========================================================
   NAVIGATION
========================================================= */

.navigation {

    margin-top:
        50px;

    display: flex;

    justify-content:
        space-between;

    gap: 20px;
}


/* =========================================================
   ERROR
========================================================= */

.error-message {

    color:
        #C62828;

    margin-top:
        12px;

    font-size:
        .95rem;
}


/* =========================================================
   SUCCESS SCREEN
========================================================= */

.success {

    text-align:
        center;

    padding:
        80px 20px;
}

.success-icon {

    font-size:
        4rem;

    color:
        var(--mc-purple);
}

.success h2 {

    font-family:
        'Nunito',
        sans-serif;

    margin-top:
        20px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:768px) {

    .rating-header,
    .rating-row {

        grid-template-columns:
            1fr
            repeat(5,45px);
    }

    .rating-question {

        font-size:
            .9rem;
    }

    .nps-grid {

        grid-template-columns:
            repeat(
                6,
                1fr
            );
    }

    .hero {

        padding:
            40px 10px;
    }

    .logo {

        width:
            220px;
    }
}



/* =========================================================
   NPS
========================================================= */

.nps-wrapper{
    margin-top:20px;
}

.nps-labels{
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
    color:#666;
    font-size:.9rem;
}

/* =========================================================
   TOAST
========================================================= */

.toast{

    position:fixed;

    bottom:30px;

    left:50%;

    transform:translateX(-50%);

    background:#111;

    color:white;

    padding:14px 20px;

    border-radius:12px;

    z-index:9999;
}

.toast.error{

    background:#b3261e;
}