/* ============================================
   TEACHER AVAILABILITY SECTION
   ============================================

   3-Column Layout:
   1. Realistic Red/Green Switch (Status Indicator)
   2. Text Scramble Effect (Availability Message)
   3. Glassmorphism Button (Opens Contact Popover)

   All controlled by: data/teacher-availability.json
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    --teacher-avail-switch-color-off: #ff1818;        /* Red for unavailable */
    --teacher-avail-switch-color-on: #18ff18;         /* Green for available */
    --teacher-avail-switch-rotation: 25deg;
    --teacher-avail-switch-pivot-distance: 20px;
    --teacher-avail-switch-width: 120px;
    --teacher-avail-switch-height: 156px; /* 1.3 * 120px */
}

/* ===== Section Layout ===== */
.teacher-avail-section {
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.05) 100%);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.teacher-avail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.teacher-avail-col:last-child {
    justify-self: end;
    padding-right: 40px;
}

.teacher-avail-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.teacher-avail-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.teacher-avail-status-text {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
}

/* ===== COLUMN 1: REALISTIC RED/GREEN SWITCH ===== */

.teacher-avail-switch-container {
    background-color: black;
    width: var(--teacher-avail-switch-width);
    height: var(--teacher-avail-switch-height);
    box-shadow:
        0 0 10px 2px rgba(0, 0, 0, 0.2),
        0 0 1px 2px black,
        inset 0 2px 2px -2px white,
        inset 0 0 2px 15px #47434c,
        inset 0 0 2px 22px black;
    border-radius: 5px;
    padding: 20px;
    perspective: 700px;
    position: relative;
    display: block;
    cursor: not-allowed;
}

.teacher-avail-switch-input {
    display: none;
}

.teacher-avail-switch-button {
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    transform-origin: center center calc(-1 * var(--teacher-avail-switch-pivot-distance));
    transform: translateZ(var(--teacher-avail-switch-pivot-distance)) rotateX(calc(-1 * var(--teacher-avail-switch-rotation)));
    transform-style: preserve-3d;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        #a10010 0%,
        #7d000d 30%,
        #7d000d 70%,
        #a10010 100%
    );
    background-repeat: no-repeat;
    box-shadow: 0 -10px 20px var(--teacher-avail-switch-color-off);
}

.teacher-avail-switch-button::before {
    content: "";
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.8) 10%,
            rgba(255, 255, 255, 0.3) 30%,
            #6a0009 75%,
            #550007
        ) 50% 50% / 97% 97%,
        #d61827;
    background-repeat: no-repeat;
    width: 100%;
    height: 50px;
    transform-origin: top;
    transform: rotateX(-90deg);
    position: absolute;
    top: 0;
}

.teacher-avail-switch-button::after {
    content: "";
    background-image: linear-gradient(#6a0009, #075507);
    width: 100%;
    height: 50px;
    transform-origin: top;
    transform: translateY(50px) rotateX(-90deg);
    position: absolute;
    bottom: 0;
    box-shadow:
        0 50px 8px 0px black,
        0 80px 20px 0px rgba(0, 0, 0, 0.5);
}

.teacher-avail-switch-light {
    opacity: 1;
    animation: teacher-avail-flicker 0.2s infinite;
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(
        #ff6b47 0%,
        #ff1818 40%,
        transparent 70%
    );
    transition: background-image 0.3s;
}

.teacher-avail-switch-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(
        transparent 30%,
        rgba(106, 0, 9, 0.7) 70%
    );
    background-size: 10px 10px;
    transition: background-image 0.3s;
}

.teacher-avail-switch-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.teacher-avail-thumbs-up,
.teacher-avail-thumbs-down {
    position: absolute;
    width: 50%;
    height: 50%;
    color: white;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.teacher-avail-thumbs-up path,
.teacher-avail-thumbs-down path {
    fill: white;
}

/* Show thumbs up when checked (available/green) */
.teacher-avail-switch-input:checked ~ .teacher-avail-switch-button .teacher-avail-thumbs-up {
    opacity: 1;
    transform: scale(1);
}

.teacher-avail-switch-input:checked ~ .teacher-avail-switch-button .teacher-avail-thumbs-down {
    opacity: 0;
    transform: scale(0.7);
}

/* Show thumbs down when unchecked (unavailable/red) */
.teacher-avail-switch-input:not(:checked) ~ .teacher-avail-switch-button .teacher-avail-thumbs-up {
    opacity: 0;
    transform: scale(0.7);
}

.teacher-avail-switch-input:not(:checked) ~ .teacher-avail-switch-button .teacher-avail-thumbs-down {
    opacity: 1;
    transform: scale(1);
}

.teacher-avail-switch-shine {
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    opacity: 0.3;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    background:
        linear-gradient(white, transparent 3%) 50% 50% / 97% 97%,
        linear-gradient(
            rgba(255, 255, 255, 0.5),
            transparent 50%,
            transparent 80%,
            rgba(255, 255, 255, 0.5)
        ) 50% 50% / 97% 97%;
    background-repeat: no-repeat;
    pointer-events: none;
}

.teacher-avail-switch-shadow {
    transition: all 0.3s cubic-bezier(1, 0, 1, 1);
    opacity: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: linear-gradient(transparent 70%, rgba(0, 0, 0, 0.8));
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Switch ON State (Green) */
.teacher-avail-switch-input:checked + .teacher-avail-switch-button {
    transform: translateZ(var(--teacher-avail-switch-pivot-distance)) rotateX(var(--teacher-avail-switch-rotation));
    box-shadow: 0 -10px 20px var(--teacher-avail-switch-color-on);
    background: linear-gradient(
        #10a010 0%,
        #0d7d0d 30%,
        #0d7d0d 70%,
        #10a010 100%
    );
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button::before {
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.8) 10%,
            rgba(255, 255, 255, 0.3) 30%,
            #096a09 75%,
            #075507
        ) 50% 50% / 97% 97%,
        #27d627;
    background-repeat: no-repeat;
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button::after {
    background-image: linear-gradient(#096a09, #075507);
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button .teacher-avail-switch-light {
    background-image: radial-gradient(
        #6bff47 0%,
        #18ff18 40%,
        transparent 70%
    );
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button .teacher-avail-switch-dots {
    background-image: radial-gradient(
        transparent 30%,
        rgba(9, 106, 9, 0.7) 70%
    );
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button .teacher-avail-switch-shine {
    opacity: 1;
}

.teacher-avail-switch-input:checked + .teacher-avail-switch-button .teacher-avail-switch-shadow {
    opacity: 0;
}

@keyframes teacher-avail-flicker {
    0% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* ===== COLUMN 2: TEXT SCRAMBLE EFFECT ===== */

.teacher-avail-text-col {
    min-height: 200px;
}

.teacher-avail-scramble-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.teacher-avail-scramble-text {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #2c3e50;
    line-height: 1.4;
    text-align: center;
    max-width: 100%;
}

.teacher-avail-scramble-dud {
    color: #95a5a6;
}

/* ===== COLUMN 3: SHIMMER BUTTON ===== */

/* Shimmer Button Variables */
:root {
    --shimmer-glow-hue-green: 120deg;
    --shimmer-glow-hue-red: 0deg;
    --shimmer-spring-easing: linear(
        0, 0.002, 0.01 0.9%, 0.038 1.8%, 0.156, 0.312 5.8%, 0.789 11.1%, 1.015 14.2%,
        1.096, 1.157, 1.199, 1.224 20.3%, 1.231, 1.231, 1.226, 1.214 24.6%,
        1.176 26.9%, 1.057 32.6%, 1.007 35.5%, 0.984, 0.968, 0.956, 0.949 42%,
        0.946 44.1%, 0.95 46.5%, 0.998 57.2%, 1.007, 1.011 63.3%, 1.012 68.3%,
        0.998 84%, 1
    );
    --shimmer-spring-duration: 1.33s;
}

@property --shimmer-shimmer {
    syntax: "<angle>";
    inherits: false;
    initial-value: 33deg;
}

@keyframes shimmer-shimmer {
    0% {
        --shimmer-shimmer: 0deg;
    }
    100% {
        --shimmer-shimmer: 360deg;
    }
}

@keyframes shimmer-shine {
    0% {
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    55% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes shimmer-text {
    0% {
        background-position: 100% center;
    }
    100% {
        background-position: -100% center;
    }
}

/* Button Wrapper - Center the button */
.teacher-avail-button-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    overflow: visible;
}

/* Base Shimmer Button Styles */
.teacher-avail-btn {
    --inset: 40px;
    --shimmer-glow-hue: var(--shimmer-glow-hue-green);

    position: relative;
    isolation: isolate;
    padding: 0.75rem 1.5rem;
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(16, 160, 16, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 160, 16, 0.3);
    border-radius: 0.66em;
    scale: 1;
    transition: all var(--shimmer-spring-duration) var(--shimmer-spring-easing);
    cursor: pointer;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: visible;
}

.teacher-avail-btn:hover:not(:active),
.teacher-avail-btn.active {
    transition-duration: calc(var(--shimmer-spring-duration) * 0.5);
    background: rgba(16, 160, 16, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2),
                0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(16, 160, 16, 0.4);
}

.teacher-avail-btn:active {
    transition-duration: calc(var(--shimmer-spring-duration) * 0.5);
}

/* Red variant for unavailable state */
.teacher-avail-btn.unavailable {
    --shimmer-glow-hue: var(--shimmer-glow-hue-red);
    background: rgba(255, 24, 24, 0.15);
    border: 1px solid rgba(255, 24, 24, 0.3);
}

.teacher-avail-btn.unavailable:hover:not(:active),
.teacher-avail-btn.unavailable.active {
    background: rgba(255, 24, 24, 0.25);
    border: 1px solid rgba(255, 24, 24, 0.4);
}

/* Shimmer overlay */
.teacher-avail-shimmer {
    position: absolute;
    inset: calc(var(--inset) * -1);
    border-radius: inherit;
    pointer-events: none;
    mask-image: conic-gradient(
        from var(--shimmer-shimmer, 0deg),
        transparent 0%,
        transparent 20%,
        black 36%,
        black 45%,
        transparent 50%,
        transparent 70%,
        black 85%,
        black 95%,
        transparent 100%
    );
    mask-size: cover;
    mix-blend-mode: plus-lighter;
    animation: shimmer-shimmer 1s linear infinite both;
}

.teacher-avail-btn:hover .teacher-avail-shimmer::before,
.teacher-avail-btn:hover .teacher-avail-shimmer::after,
.teacher-avail-btn.active .teacher-avail-shimmer::before,
.teacher-avail-btn.active .teacher-avail-shimmer::after {
    opacity: 1;
    animation: shimmer-shine 1.2s ease-in 1 forwards;
}

.teacher-avail-shimmer::before,
.teacher-avail-shimmer::after {
    transition: all 0.5s ease;
    opacity: 0;
    content: "";
    border-radius: inherit;
    position: absolute;
    mix-blend-mode: color;
    inset: var(--inset);
    pointer-events: none;
}

.teacher-avail-shimmer::before {
    box-shadow: 0 0 calc(var(--inset) * 0.1)  2px hsl(var(--shimmer-glow-hue) 20% 95%),
        0 0 calc(var(--inset) * 0.18)  4px hsl(var(--shimmer-glow-hue) 20% 80%),
        0 0 calc(var(--inset) * 0.33)  4px hsl(var(--shimmer-glow-hue) 50% 70%),
        0 0 calc(var(--inset) * 0.66) 5px hsl(var(--shimmer-glow-hue) 100% 70%);
    z-index: -1;
}

.teacher-avail-shimmer::after {
    box-shadow: inset 0 0 0 1px hsl(var(--shimmer-glow-hue) 70% 95%),
        inset 0 0 2px 1px hsl(var(--shimmer-glow-hue) 100% 80%),
        inset 0 0 5px 2px hsl(var(--shimmer-glow-hue) 100% 70%);
    z-index: 2;
}

/* Text with shimmer animation */
.teacher-avail-btn #teacherBtnText {
    color: #ffffff;
    background-clip: text;
    background-color: #ffffff;
    background-image: linear-gradient(120deg, #ffffff, rgba(255, 255, 255, 1) 40%, rgba(230, 230, 255, 1) 50%, #ffffff 52%);
    background-repeat: no-repeat;
    background-size: 300% 300%;
    background-position: 0% center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

.teacher-avail-btn:hover #teacherBtnText,
.teacher-avail-btn.active #teacherBtnText {
    animation: shimmer-text 0.66s ease-in 1 both;
}

/* ===== COLUMN 3: GLASSMORPHISM BUTTON ===== */

.teacher-avail-popover-btn {
    --inset: 40px;
    --shimmer-glow-hue: 213deg; /* David Blue */

    position: relative;
    isolation: isolate;
    padding: 1rem 2rem;
    border: none;
    background: rgba(74, 144, 226, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 0.66em;
    transition: all 1.33s linear(
        0, 0.002, 0.01 0.9%, 0.038 1.8%, 0.156, 0.312 5.8%, 0.789 11.1%, 1.015 14.2%,
        1.096, 1.157, 1.199, 1.224 20.3%, 1.231, 1.231, 1.226, 1.214 24.6%,
        1.176 26.9%, 1.057 32.6%, 1.007 35.5%, 0.984, 0.968, 0.956, 0.949 42%,
        0.946 44.1%, 0.95 46.5%, 0.998 57.2%, 1.007, 1.011 63.3%, 1.012 68.3%,
        0.998 84%, 1
    );
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.teacher-avail-popover-btn:hover {
    transition-duration: 0.665s;
    scale: 1.2;
    background: rgba(74, 144, 226, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(74, 144, 226, 0.4);
}

/* ===== POPOVER SYSTEM ===== */

.teacher-avail-popover {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.teacher-avail-popover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.teacher-avail-content {
    position: relative;
    width: min(90vw, 550px);
    max-height: 90vh;
    background: rgba(var(--overlay-color), var(--overlay-opacity));
    border-radius: 1.5rem;
    border: 1px solid rgba(var(--border-color), 0.3);
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(var(--border-color), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 2;
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    padding: 2.5rem;
    animation: popoverSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.teacher-avail-popover-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(var(--text-color), 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: rgba(var(--text-color), 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.teacher-avail-popover-close:hover {
    background: rgba(var(--text-color), 0.2);
    transform: scale(1.1);
}

.teacher-avail-popover-header {
    margin-bottom: 2rem;
}

.teacher-avail-popover-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(var(--text-color), 1);
    margin: 0 0 0.5rem 0;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.teacher-avail-popover-header p {
    font-size: 1rem;
    color: rgba(var(--text-color), 0.8);
    margin: 0;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ===== POPOVER BODY ===== */

.teacher-avail-popover-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ===== CONTACT BUTTONS WITH SHIMMER ===== */

.teacher-avail-contact-btn {
    --contact-inset: 30px;
    --contact-shimmer-hue: 142deg; /* Green default */

    position: relative;
    isolation: isolate;
    padding: 1rem 1.5rem;
    border: none;
    background: rgba(34, 197, 94, 0.15); /* Green */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: rgba(var(--text-color), 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all var(--shimmer-spring-duration) var(--shimmer-spring-easing);
    overflow: visible;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.teacher-avail-contact-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.teacher-avail-btn-text {
    position: relative;
    z-index: 3;
}

.teacher-avail-contact-btn:hover:not(.teacher-avail-disabled) {
    transition-duration: calc(var(--shimmer-spring-duration) * 0.5);
    background: rgba(34, 197, 94, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.teacher-avail-contact-btn:active:not(.teacher-avail-disabled) {
    transition-duration: calc(var(--shimmer-spring-duration) * 0.5);
}

/* Line button - Line green */
.teacher-avail-line-btn {
    --contact-shimmer-hue: 142deg;
    background: rgba(6, 199, 85, 0.15);
    border: 1px solid rgba(6, 199, 85, 0.3);
}

.teacher-avail-line-btn:hover:not(.teacher-avail-disabled) {
    background: rgba(6, 199, 85, 0.25);
    border: 1px solid rgba(6, 199, 85, 0.4);
}

/* Stripe button - Purple */
.teacher-avail-stripe-btn {
    --contact-shimmer-hue: 260deg;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.teacher-avail-stripe-btn:hover:not(.teacher-avail-disabled) {
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

/* Disabled state */
.teacher-avail-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Shimmer overlay for contact buttons */
.teacher-avail-btn-shimmer {
    position: absolute;
    inset: calc(var(--contact-inset) * -1);
    border-radius: inherit;
    pointer-events: none;
    mask-image: conic-gradient(
        from var(--shimmer-shimmer, 0deg),
        transparent 0%,
        transparent 20%,
        black 36%,
        black 45%,
        transparent 50%,
        transparent 70%,
        black 85%,
        black 95%,
        transparent 100%
    );
    mask-size: cover;
    mix-blend-mode: plus-lighter;
    animation: shimmer-shimmer 1s linear infinite both;
}

.teacher-avail-contact-btn:hover:not(.teacher-avail-disabled) .teacher-avail-btn-shimmer::before,
.teacher-avail-contact-btn:hover:not(.teacher-avail-disabled) .teacher-avail-btn-shimmer::after {
    opacity: 1;
    animation: shimmer-shine 1.2s ease-in 1 forwards;
}

.teacher-avail-btn-shimmer::before,
.teacher-avail-btn-shimmer::after {
    transition: all 0.5s ease;
    opacity: 0;
    content: "";
    border-radius: inherit;
    position: absolute;
    mix-blend-mode: color;
    inset: var(--contact-inset);
    pointer-events: none;
}

.teacher-avail-btn-shimmer::before {
    box-shadow:
        0 0 calc(var(--contact-inset) * 0.1) 2px hsl(var(--contact-shimmer-hue) 20% 95%),
        0 0 calc(var(--contact-inset) * 0.18) 4px hsl(var(--contact-shimmer-hue) 20% 80%),
        0 0 calc(var(--contact-inset) * 0.33) 4px hsl(var(--contact-shimmer-hue) 50% 70%),
        0 0 calc(var(--contact-inset) * 0.66) 5px hsl(var(--contact-shimmer-hue) 100% 70%);
    z-index: -1;
}

.teacher-avail-btn-shimmer::after {
    box-shadow:
        inset 0 0 0 1px hsl(var(--contact-shimmer-hue) 70% 95%),
        inset 0 0 2px 1px hsl(var(--contact-shimmer-hue) 100% 80%),
        inset 0 0 5px 2px hsl(var(--contact-shimmer-hue) 100% 70%);
    z-index: 2;
}

/* ===== POPOVER FOOTER ===== */

.teacher-avail-popover-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--border-color), 0.2);
}

.teacher-avail-free-trial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
    color: rgba(var(--text-color), 0.9);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.teacher-avail-free-trial svg {
    flex-shrink: 0;
    color: rgba(247, 220, 111, 1);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.teacher-avail-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.teacher-avail-option {
    --inset: 30px;
    --shimmer-glow-hue: 142deg; /* Green for contact */

    position: relative;
    isolation: isolate;
    padding: 1.5rem 1rem;
    border: none;
    background: rgba(74, 144, 226, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.teacher-avail-option:hover:not(:disabled) {
    scale: 1.05;
    background: rgba(74, 144, 226, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.teacher-avail-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.teacher-avail-trial-info {
    grid-column: 1 / -1;
    background: rgba(247, 220, 111, 0.2);
    border: 1px solid rgba(247, 220, 111, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1rem;
}

.teacher-avail-trial-info strong {
    display: block;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.teacher-avail-trial-info p {
    font-size: 0.9rem;
    color: rgba(44, 62, 80, 0.8);
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 768px) {
    .teacher-avail-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }

    .teacher-avail-section {
        padding: 40px 0;
    }

    .teacher-avail-scramble-text {
        font-size: 24px;
    }

    .teacher-avail-options-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .teacher-avail-section {
        padding: 30px 0;
    }

    .teacher-avail-container {
        gap: 30px;
        padding: 0 15px;
    }

    /* Reduce switch size */
    :root {
        --teacher-avail-switch-width: 100px;
        --teacher-avail-switch-height: 130px;
    }

    .teacher-avail-scramble-text {
        font-size: 20px;
    }

    .teacher-avail-heading {
        font-size: 1rem;
    }

    .teacher-avail-content {
        width: 95vw;
        padding: 1.5rem;
    }

    .teacher-avail-popover-header h2 {
        font-size: 1.5rem;
    }

    .teacher-avail-contact-btn {
        font-size: 0.9rem;
        padding: 0.9rem 1.2rem;
    }

    .teacher-avail-option {
        padding: 1.2rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ===== UTILITY CLASSES ===== */

.hidden {
    display: none !important;
}
