﻿/* ============================================================
   SURVEY OVERRIDES (conservative rewrite)
   Loaded by StudentParentEval.Master only.

   Strategy: clean visual polish without restructuring per-school
   markup or constraining widths. Per-school .aspx files use
   Bootstrap's <div class="container"> and varying col-md-3/4
   column widths — we work with those, not against them.

   Key class hooks available across all per-school files:
   - .rbl  → on every <asp:RadioButtonList> (CssClass="rbl")
   - .container → standard Bootstrap container (per-school chrome)

   We DON'T target broad selectors like `table:has(input[type=radio])`
   — those caused horizontal-scroll layout breaks on real survey pages.
   ============================================================ */

/* ---------- Page foundation ---------- */
html, body {
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.5;
    font-family: 'Poppins', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden; /* belt + suspenders against per-school markup overflow */
}

/* survey-page-wrap is added to StudentParentEval.Master around the ContentPlaceHolder.
   Light vertical padding so the page has air. NO max-width — let per-school
   <div class="container"> control horizontal layout (Bootstrap is doing it correctly). */
.survey-page-wrap {
    padding: 24px 0 60px;
    min-height: 100vh;
}

/* Soft accent strip at the very top of the page. Neutral so it complements
   every school color. School logo below provides the actual brand identity. */
body::before {
    content: "";
    display: block;
    height: 4px;
    background: #1f2937;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* ---------- Header (school logo + title) ----------
   Per-school markup uses .page-header inside .container with the logo and h2 inline.
   Just add breathing room and modernize the heading. */
.survey-page-wrap .page-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    margin-top: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

    .survey-page-wrap .page-header img {
        max-height: 80px;
        max-width: 100px;
        height: auto;
        width: auto;
        margin: 0;
    }

    .survey-page-wrap .page-header h2 {
        font-size: 22px;
        font-weight: 600;
        color: #111827;
        margin: 0;
        line-height: 1.3;
        letter-spacing: -0.01em;
    }

@media (max-width: 600px) {
    .survey-page-wrap .page-header h2 {
        font-size: 18px;
    }

    .survey-page-wrap .page-header img {
        max-height: 60px;
        max-width: 80px;
    }
}

/* ---------- Eval details panel (Coach Name, Sport, Level, etc.) ----------
   The user control StudentParentEvaluationDetails.ascx renders 4 rows of
   col-md-3 label/value pairs at the top of every survey. We add a wrapper
   div with class .survey-eval-details to the user control itself for targeting. */
.survey-eval-details {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px 14px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

    .survey-eval-details .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .survey-eval-details [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .survey-eval-details label {
        color: #6b7280;
        font-weight: 500;
        font-size: 13px;
        margin-bottom: 0;
    }

    .survey-eval-details span {
        color: #111827;
        font-weight: 500;
        font-size: 14px;
    }

/* ---------- Required marker / divider ---------- */
.survey-page-wrap label[style*="color: red"],
.survey-page-wrap label[style*="color:red"] {
    color: #dc2626 !important;
    font-size: 13px !important;
    font-weight: 600;
}

/* The horizontal rule that separates eval details from questions —
   replace the chunky 2.5px black bar with a soft divider */
.survey-page-wrap hr {
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    margin: 20px 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* ---------- Question prompts ----------
   Per-school markup wraps each question in <p style="font-size: large; font-style: italic;">.
   We can't change the inline styles, but we can refine the rendering with our own rules
   that use higher specificity. */
.survey-page-wrap p[style*="italic"] {
    font-size: 15px !important;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* ---------- Free-text inputs (Your Name, comments) ---------- */
.survey-page-wrap .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: auto;
}

    .survey-page-wrap .form-control:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        outline: none;
    }

/* Textareas (Suggestions, Additional Comments) */
.survey-page-wrap textarea.form-control {
    line-height: 1.5;
    min-height: 100px;
}

/* ---------- Radio button lists (.rbl class on every RadioButtonList) ----------
   Conservative styling: just clean up the vertical spacing, give the radios a modern
   accent color, and ensure each option is comfortable to tap on mobile.

   We do NOT make the labels into full-width cards — that broke layouts on per-school
   pages with col-md-3/col-md-4 columns of varying widths. Plain stacked radios with
   good spacing read fine and adapt to whatever width the school's column gives them. */
.survey-page-wrap .rbl {
    margin: 4px 0 16px;
}

    /* ASP.NET RadioButtonList renders as a <table>. Strip default table styling. */
    .survey-page-wrap .rbl,
    .survey-page-wrap .rbl tbody,
    .survey-page-wrap .rbl tr {
        border: none !important;
        background: transparent !important;
    }

        .survey-page-wrap .rbl td {
            padding: 4px 0 !important;
            border: none !important;
            background: transparent !important;
            vertical-align: middle;
        }

        /* The radio bullet itself — modern accent color, comfortable size */
        .survey-page-wrap .rbl input[type="radio"] {
            width: 16px;
            height: 16px;
            accent-color: #2563eb;
            margin: 0 8px 0 0;
            cursor: pointer;
            vertical-align: middle;
        }

        /* The radio label text */
        .survey-page-wrap .rbl label {
            color: #1f2937;
            font-weight: 400;
            font-size: 14px;
            cursor: pointer;
            margin: 0 !important;
            padding: 4px 0;
            line-height: 1.4;
            vertical-align: middle;
            display: inline-block;
        }

            .survey-page-wrap .rbl label:hover {
                color: #2563eb;
            }

/* ---------- Submit button ---------- */
.survey-page-wrap .btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
    transition: background 0.15s;
}

    .survey-page-wrap .btn-primary:hover,
    .survey-page-wrap .btn-primary:focus {
        background: #1d4ed8 !important;
        border-color: #1d4ed8 !important;
        color: white !important;
    }

/* ---------- Validation messages ---------- */
.survey-page-wrap .label-danger {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    display: inline-block;
    margin-top: 4px;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 600px) {
    .survey-page-wrap {
        padding: 16px 0 50px;
    }

        .survey-page-wrap .btn-primary {
            width: 100%;
            padding: 12px 20px;
            font-size: 15px;
        }
        /* Tighten Bootstrap's container padding on mobile */
        .survey-page-wrap .container {
            padding-left: 12px;
            padding-right: 12px;
        }
}

/* ---------- Print stylesheet ---------- */
@media print {
    body::before {
        display: none;
    }

    .survey-page-wrap {
        padding: 0;
    }

        .survey-page-wrap .btn-primary {
            display: none;
        }
}
