/* Local Inter Font Family Integration */
@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset */
* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Top Blur Gradient Element */
.s-s-2-top-blur-gradient {
    position: absolute;
    top: -360px;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(180deg, #6FEBFF 0%, #17A2B8 100%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

/* Header Branding Alignment */
.s-s-2-header-brand {
    position: absolute;
    top: 15px;
    left: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: #475569;
    background: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    z-index: 20;
}

.s-s-2-header-brand.s-s-2-right {
    left: auto;
    right: 40px;
}

/* Card Wrapper (Scrollable if height decreases) */
.s-s-2-card-wrapper {
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    overflow-y: auto;
}

/* Main Heading */
h1 {
    font-weight: 700;
    font-size: 2.25rem;
    color: #0f172a;
    text-align: center;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}

/* Card Container */
.s-s-2-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 28px;
    padding: 18px 18px;
    padding-bottom: 30px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 0 15px rgba(23, 162, 184, 0.06);
    margin-top: 40px;
}

/* Search Input */
#schoolSearch {
    width: 100%;
    padding: 14px 15px;
    border-radius: 16px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#schoolSearch::placeholder {
    color: #94a3b8;
}

#schoolSearch:focus {
    border-color: #17A2B8;
    box-shadow: 0 0 0 5px rgba(23, 162, 184, 0.15);
}

/* School List Dropdown */
#schoolList {
    margin-top: 12px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    text-align: left;
}

#schoolList div {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

#schoolList div:last-child {
    border-bottom: none;
    border-radius: 0 0 14px 14px;
}

#schoolList div:first-child {
    border-radius: 14px 14px 0 0;
}

#schoolList div:hover {
    background-color: #17A2B8;
    color: #ffffff;
}

/* Selected state in dropdown */
#schoolList div.selected-item,
#schoolList div.selected-item:hover {
    background-color: #17A2B8 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

.s-s-2-skeleton-item {
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.5s infinite linear;
    border-bottom: 1px solid #17A2B8;
    height: 52px;
}

.s-s-2-skeleton-item:last-child {
    border-bottom: none;
    border-radius: 0 0 14px 14px;
}

.s-s-2-skeleton-item:first-child {
    border-radius: 14px 14px 0 0;
}

/* Selected School Panel */
#selectedSchool {
    margin-top: 12px;
    padding: 10px;
    padding-top: 20px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#selectedSchool h2 {
    margin: 0 0 16px 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f172a;
    line-height: 0.5;
    text-align: center;
}

/* Portal Buttons */
.s-s-2-portalBtn {
    display: inline-block;
    width: 100%;
    background-color: #cbd5e1;
    color: #94a3b8;
    font-weight: 600;
    padding: 14px 0;
    border-radius: 14px;
    font-size: 0.95rem;
    text-decoration: none;
    pointer-events: none;
    cursor: not-allowed;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.s-s-2-portalBtn.s-s-2-enabled {
    background-color: #17A2B8;
    color: #ffffff;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(23, 162, 184, 0.3);
}

.s-s-2-portalBtn.s-s-2-enabled:last-child {
    background-color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.3);
}

.s-s-2-portalBtn.s-s-2-enabled:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.s-s-2-portalBtn.s-s-2-enabled:active {
    transform: translateY(0);
}

/* Scrollbar styling for list */
#schoolList::-webkit-scrollbar {
    width: 8px;
}

#schoolList::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 16px;
}

#schoolList::-webkit-scrollbar-thumb {
    background: #17A2B8;
    border-radius: 16px;
    border: 2px solid #ffffff;
}

#schoolList::-webkit-scrollbar-thumb:hover {
    background: #138496;
}

/* Bottom Footer */
.s-s-2-card-footer {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
}

.s-s-2-card-app-version {
    margin-top: 12px;
    margin-bottom: -28px;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
    color: #17A2B8;
}

/* Bottom Wave Background */
.s-s-2-bottom-wave {
    position: fixed;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 420px;
    background-image: url('images/curve-bg.svg');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

@media (min-width: 1400px) and (max-width: 1600px) {
    h1 {
        font-size: 2rem;
    }

    #schoolSearch {
        padding: 12px 15px;
    }
}

@media (min-width: 1050px) and (max-width: 1399px) {
    h1 {
        font-size: 1.75rem;
    }

    #schoolSearch {
        padding: 12px 15px;
    }
}

@media (min-width: 641px) and (max-width: 1049px) {
    h1 {
        font-size: 1.50rem;
    }

    #schoolSearch {
        padding: 12px 15px;
    }
}

@media (max-width: 640px) {
    .s-s-2-header-brand {
        top: 16px;
        left: 16px;
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .s-s-2-card-wrapper {
        padding: 20px 0;
        align-items : flex-start;
    }

    .s-s-2-header-brand.s-s-2-right {
        top: 16px;
        left: auto;
        right: 16px;
    }

    .s-s-2-container {
        padding: 15px 12px;
        max-width: 95%;
        margin-top: 30px;
    }

    .s-s-2-bottom-wave {
        height: 180px;
        left: 0;
        width: 100%;
    }

    .s-s-2-top-blur-gradient {
        top: -220px;
        height: 200px;
        filter: blur(50px);
    }

    .s-s-2-card-app-version {
        margin-bottom: -12px;
    }

    h1 {
        font-size: 1.50rem;
    }

    #schoolSearch {
        padding: 10px 15px;
    }
}