@import url('fonts.css');

:root {
    --card-bg: rgba(255, 255, 255, 0.8);
    --input-border: #d1d5db;
    --primary-purple: #923fa2;
    --text-dark: #01161e;
}

/* Generic page layouts */

/* Logowanie / rejestracja: jeden „ekran” bez przewijania dokumentu (mobile + fiszki).
   Strony z długą treścią (regulamin itd.) mają body.lexicave-login--scroll — tam nie blokujemy html. */
html:has(body.lexicave-login:not(.lexicave-login--scroll)) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body.lexicave-login {
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    overscroll-behavior: none;
    position: relative;
}

/* Fiszki w osobnej warstwie — nie zwiększają scrollHeight dokumentu (wcześniej: bottom:-150px + animacja). */
.lexicave-login-fiszka-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

body.lexicave-dashboard {
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    align-items: center;
}

/* Utility flex helpers */

.fcc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.frc {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-1 {
    flex: 1;
}

/* Login page */

.floating-fiszka {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    z-index: 1;
    bottom: -150px;
    animation: floatUp 15s infinite linear;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-fiszka span {
    transform: rotate(-90deg);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 380px;
    z-index: 10;
    text-align: center;
    backdrop-filter: blur(5px);
}

.login-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.login-logo-row img {
    width: auto;
    height: 12vw;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--input-border);
    border-radius: 2rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
    background: #ffffff55;
    font-family: 'Quicksand', sans-serif;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-btn {
    font-family: 'Jost', sans-serif;
    width: 100%;
    padding: 14px;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 10px;
}

.login-btn:hover {
    background: #a24fb2;
    transform: translateY(-1px);
}

.login-card h1,
.login-card h2,
.login-card h3,
.login-card h4,
.login-card h5,
.login-card h6 {
    font-weight: normal;
    margin-top: 0;
}

.login-card h4 {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Dashboard layout and components */

.top-bar {
    transition: opacity 1s;
    align-self: stretch;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 20;
    color: white;
    font-family: 'Quicksand', sans-serif;
    margin-bottom: -108px;
}

.topBar-btn {
    font-family: 'Jost', sans-serif;
    text-decoration: none;
    padding: 8px 20px;
    background: #4c4c4c;
    color: white;
    border-radius: 2rem;
    font-size: 1rem;
    transition: transform 0.2s, background 0.2s;
}

.topBar-btn:hover {
    transform: translateY(-1px);
    background: #404040;
}

#logoutButton {
    background: #923fa2;
}

#logoutButton:hover {
    background: #a24fb2;
}

.main-content {
    flex: 1;
    padding: 2rem;
    z-index: 10;
    overflow-y: auto;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.panel-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 3rem;
}

.panel-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #222222;
    margin: 0;
    padding-right: 1rem;
    padding-left: 1rem;
}

.panel-sublabel {
    color: #333333;
    font-weight: 400;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
}

.big-btn {
    font-family: 'Quicksand', sans-serif;
    flex: 1;
    padding: 1rem 1rem;
    background: var(--card-bg);
    color: #01161e;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(50px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-direction: column;
}

.big-btn:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Override hover for colored CTA buttons so they keep their color */
.big-btn.btn-grey {
    background: #4c4c4c;
    color: white;
}

.big-btn.btn-grey:hover {
    background: #404040;
    color: white;
}

.big-btn.btn-purple {
    background: #923fa2;
    color: white;
}

.big-btn.btn-purple:hover {
    background: #a24fb2;
    color: white;
}

.small-btn {
    font-family: 'Jost', sans-serif;
    text-decoration: none;
    padding: 6px 16px;
    background: #4c4c4c;
    color: white;
    border-radius: 2rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
}

.small-btn:hover {
    transform: translateY(-1px);
    background: #404040;
}

.small-btn-red {
    background: #923fa2;
}

.small-btn-red:hover {
    background: #a24fb2;
}

.studentOrTeacherRow {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: #ffffff99;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.scrollableStudentOrTeacherList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 40vh;
    overflow-y: scroll;
    min-height: 30vh;
}

.listRowSpacer {
    flex: 1;
    min-width: 3rem;
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column;
        padding: 0 20px;
    }
    .panel-label {
        font-size: 1.8rem;
    }
}

