/* ==========================================================
   MATH EVENT — CONTACT FORM 7 + CALENDRIER
   ========================================================== */

.math-event-quote {
    --me-bg: #07070b;
    --me-card: #111116;
    --me-field: #09090f;
    --me-border: rgba(255,255,255,.10);
    --me-text: #ffffff;
    --me-muted: #9b9ba8;
    --me-purple: #8b4dff;
    --me-purple-2: #a968ff;

    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--me-text);
}

.math-event-quote,
.math-event-quote * {
    box-sizing: border-box;
}

.math-event-quote .me-intro {
    text-align: center;
    margin: 0 auto 44px;
    max-width: 760px;
}

.math-event-quote .me-kicker {
    margin: 0 0 12px;
    color: #b982ff;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 800;
}

.math-event-quote .me-title {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.math-event-quote .me-subtitle {
    margin: 20px auto 0;
    max-width: 720px;
    color: var(--me-muted);
    line-height: 1.7;
    font-size: 17px;
}

.math-event-quote .me-form-card {
    background:
        radial-gradient(circle at 15% 0%, rgba(139,77,255,.08), transparent 35%),
        var(--me-card);
    border: 1px solid var(--me-border);
    border-radius: 26px;
    padding: clamp(22px, 5vw, 46px);
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.math-event-quote .me-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 24px 22px;
}

.math-event-quote .me-field {
    min-width: 0;
}

.math-event-quote .me-field.me-full {
    grid-column: 1 / -1;
}

.math-event-quote label.me-label {
    display: block;
    margin: 0 0 9px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.math-event-quote .me-required {
    color: #ad73ff;
}

.math-event-quote input[type="text"],
.math-event-quote input[type="email"],
.math-event-quote input[type="tel"],
.math-event-quote input[type="number"],
.math-event-quote select,
.math-event-quote textarea {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: var(--me-field);
    color: #fff;
    outline: 0;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.math-event-quote input[type="text"],
.math-event-quote input[type="email"],
.math-event-quote input[type="tel"],
.math-event-quote input[type="number"],
.math-event-quote select {
    min-height: 56px;
    padding: 0 16px;
}

.math-event-quote textarea {
    min-height: 155px;
    padding: 16px;
    resize: vertical;
}

.math-event-quote input::placeholder,
.math-event-quote textarea::placeholder {
    color: #72727e;
}

.math-event-quote input:focus,
.math-event-quote select:focus,
.math-event-quote textarea:focus {
    border-color: rgba(155,91,255,.82);
    box-shadow: 0 0 0 4px rgba(139,77,255,.11);
    background: #0b0b12;
}

.math-event-quote select {
    appearance: auto;
}

/* Visually hide CF7's required text field used to carry the selected date. */
.math-event-quote .me-hidden-date-wrap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* Calendar */
.math-event-calendar {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: #09090f;
}

.me-cal-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.me-cal-title {
    text-align: center;
    color: #fff;
    font-weight: 800;
    font-size: 17px;
}

.me-cal-nav {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1px solid rgba(255,255,255,.12);
    background: #15151d;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    transition: .2s ease;
}

.me-cal-nav:hover:not(:disabled) {
    border-color: #8b4dff;
    background: #20152f;
}

.me-cal-nav:disabled {
    opacity: .28;
    cursor: not-allowed;
}

.me-cal-weekdays,
.me-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0,1fr));
    gap: 7px;
}

.me-cal-weekdays {
    margin-bottom: 7px;
}

.me-cal-weekdays > div {
    padding: 7px 2px;
    text-align: center;
    color: #7f7f8d;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}

.me-cal-day,
.me-cal-blank {
    aspect-ratio: 1 / 1;
    min-width: 0;
}

.me-cal-day {
    border: 1px solid transparent;
    border-radius: 10px;
    background: #111119;
    color: #eaeaf0;
    font-weight: 700;
    cursor: pointer;
    transition: .16s ease;
}

.me-cal-day:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(139,77,255,.65);
    background: #1b1229;
}

.me-cal-day.is-selected {
    background: linear-gradient(135deg,#7640ff,#a75eff);
    color: #fff;
    box-shadow: 0 7px 22px rgba(123,62,255,.30);
}

.me-cal-day.is-unavailable {
    background: #0d0d12;
    color: #50505a;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: .68;
}

.me-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 15px;
    color: #81818d;
    font-size: 12px;
}

.me-cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.me-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.me-dot-selected {
    background: #8b4dff;
}

.me-dot-unavailable {
    background: #50505a;
}

.me-cal-selected {
    margin-top: 14px;
    color: #b2b2bd;
    font-size: 13px;
}

/* Radio cards */
.math-event-quote .me-choice .wpcf7-list-item {
    margin: 0 10px 10px 0;
}

.math-event-quote .me-choice label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 999px;
    background: #0a0a10;
    color: #d9d9e0;
    cursor: pointer;
}

.math-event-quote .me-choice input[type="radio"] {
    accent-color: #8b4dff;
}

/* Submit */
.math-event-quote .me-submit-row {
    margin-top: 30px;
    text-align: center;
}

.math-event-quote input[type="submit"] {
    min-width: 250px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    padding: 0 28px;
    background: linear-gradient(135deg,#713aff,#a858ff);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(124,60,255,.24);
    transition: transform .2s ease, box-shadow .2s ease;
}

.math-event-quote input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(124,60,255,.34);
}

/* CF7 messages */
.math-event-quote .wpcf7-not-valid-tip {
    color: #ff8c9b;
    font-size: 12px;
    margin-top: 7px;
}

.math-event-quote .wpcf7-response-output {
    margin: 24px 0 0 !important;
    padding: 14px 16px !important;
    border-radius: 12px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.12) !important;
    background: #0c0c12;
}

@media (max-width: 760px) {
    .math-event-quote {
        padding: 28px 14px;
    }

    .math-event-quote .me-grid {
        grid-template-columns: 1fr;
    }

    .math-event-quote .me-field.me-full {
        grid-column: auto;
    }

    .math-event-quote .me-form-card {
        border-radius: 20px;
        padding: 20px 16px;
    }

    .math-event-calendar {
        padding: 12px 8px;
    }

    .me-cal-weekdays,
    .me-cal-grid {
        gap: 4px;
    }

    .me-cal-day {
        border-radius: 8px;
        font-size: 12px;
    }
}
