/* Główny plik stylów dla ZTWS Quiz - public/assets/css/style.css */

/* Import czcionki Poppins (już zaimportowana w header.php, ale można dodać jako fallback) */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa; /* Jasne tło dla większości stron */
    color: #333;
    line-height: 1.6;
}

/* ----- Nawigacja ----- */
.navbar {
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand .logo-ztws {
    color: #5144C7; /* Główny kolor fioletowy */
    font-weight: 700;
}

.navbar-brand .logo-quiz {
    color: #E5BD55; /* Główny kolor złoty/żółty */
    font-weight: 500;
}

.navbar-nav .nav-link {
    color: #555;
    font-weight: 500;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: color 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #5144C7; /* Kolor aktywny/hover */
}

.navbar-toggler {
    border: none;
}
.navbar-toggler:focus {
    box-shadow: none;
}

.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background-color: #f1f0ff; /* Lekki fiolet tła */
    color: #5144C7;
}

/* ----- Przyciski ----- */
.btn {
    font-weight: 500;
    border-radius: 0.375rem; /* Bootstrap default, można zwiększyć */
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: #5144C7;
    border-color: #5144C7;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #4136a0;
    border-color: #3a2f8f;
    box-shadow: 0 0 0 0.25rem rgba(81, 68, 199, 0.5);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn.rounded-pill {
     border-radius: 50rem; /* Bootstrap class */
}

/* ----- Formularze ----- */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.6rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #a8a0e8; /* Jaśniejszy fiolet dla focus */
    box-shadow: 0 0 0 0.25rem rgba(81, 68, 199, 0.25);
}

.form-control-lg {
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
}

.input-group-text {
     background-color: #e9ecef;
     border: 1px solid #ced4da;
     border-radius: 0.375rem 0 0 0.375rem; /* Zaokrąglenie lewej strony */
}
.input-group .form-control {
    border-radius: 0 0.375rem 0.375rem 0; /* Zaokrąglenie prawej strony */
}
.input-group.input-group-lg .form-control,
.input-group.input-group-lg .input-group-text {
    font-size: 1.1rem;
}


/* ----- Karty (Cards) ----- */
.card {
    border: none; /* Usuń domyślną ramkę Bootstrapa */
    border-radius: 0.75rem; /* Bardziej zaokrąglone rogi */
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    /* transform: translateY(-3px); */ /* Lekkie uniesienie przy najechaniu - opcjonalne */
    /* box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1); */ /* Mocniejszy cień przy najechaniu - opcjonalne */
}

.card-title {
    color: #333;
}

/* ----- Stopka ----- */
footer {
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
}

footer a {
    color: #5144C7;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* ----- Alerty / Komunikaty Flash ----- */
.alert {
    border-radius: 0.5rem;
    border-left-width: 5px;
    padding: 1rem 1.5rem;
}
.alert-primary { border-left-color: #5144C7; }
.alert-success { border-left-color: #198754; }
.alert-danger { border-left-color: #dc3545; }
.alert-warning { border-left-color: #ffc107; }
.alert-info { border-left-color: #0dcaf0; }

/* ----- Elementy specyficzne dla quizu (dodaj więcej w miarę rozwoju) ----- */

/* Licznik czasu (przykład - dostosuj w JS) */
.timer-circle {
    position: relative;
    width: 80px; /* Rozmiar koła */
    height: 80px;
    border-radius: 50%;
    background-color: #e9ecef; /* Tło koła */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto; /* Wyśrodkowanie */
}

.timer-progress { /* SVG lub div jako nakładka */
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Style dla paska postępu SVG/CSS */
}

.timer-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: #5144C7; /* Kolor cyfr */
}

/* Bloczki odpowiedzi (przykład) */
.answer-block {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    color: white;
    font-weight: 500;
}

.answer-block:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.answer-block.selected { /* Styl dla zaznaczonej odpowiedzi */
    border-color: white;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Przykładowe kolory - dostosuj */
.answer-block-a { background-color: #dc3545; } /* Czerwony */
.answer-block-b { background-color: #0d6efd; } /* Niebieski */
.answer-block-c { background-color: #ffc107; } /* Żółty */
.answer-block-d { background-color: #198754; } /* Zielony */
.answer-block-true { background-color: #198754; } /* Zielony dla Prawda */
.answer-block-false { background-color: #dc3545; } /* Czerwony dla Fałsz */

.answer-label { /* Litera A, B, C, D */
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* ----- Widok uczestnika ----- */
.answer-button {
    display: flex;
    align-items: center; /* Rozciągnij dzieci na pełną wysokość */
    padding: 0;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: white;
    font-weight: 500;
    min-height: 70px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Aby zaokrąglić rogi dla dzieci */
    border: 3px solid transparent;
}

.answer-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.answer-button.selected {
    border-color: white;
    transform: scale(1.05);
}

.answer-button.disabled, .answer-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 1.5rem;
    font-weight: 700;
}

.answer-text {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    flex-grow: 1;
    text-align: left;
}

.answer-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.answer-button.selected .answer-checkbox {
    opacity: 1;
}

/* Kolory dla przycisków */
.answer-button.color-0 { background-color: #dc3545; } /* Czerwony */
.answer-button.color-1 { background-color: #0d6efd; } /* Niebieski */
.answer-button.color-2 { background-color: #ffc107; color: #333; } /* Żółty */
.answer-button.color-3 { background-color: #198754; } /* Zielony */
.answer-button.true { background-color: #198754; } /* Zielony */
.answer-button.false { background-color: #dc3545; } /* Czerwony */

/* Style dla pytań typu "ordering" */
.ordering-answer-item {
    display: flex;
    align-items: stretch;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    min-height: 70px;
    background-color: #f8f9fa; /* Jasne, neutralne tło */
    color: #333; /* Ciemny tekst */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.ordering-answer-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-color: #5144C7;
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background-color: #e9ecef;
    color: #6c757d;
    cursor: move;
    border-right: 1px solid #dee2e6;
}

.position-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background-color: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    font-weight: 700;
}

/* Style dla ikony "przeciągnij" w pytaniach typu ordering */
.answer-drag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    font-size: 1.5rem;
    opacity: 0.8; /* Zwiększona widoczność ikony */
}

/* Specjalne style dla przycisków typu "ordering" */
.answer-button.ordering-item {
    background-color: #9b4f57 !important; /* Bordowy kolor dla ordering */
    color: #fff !important; /* Biały tekst dla kontrastu */
    touch-action: none; /* Kluczowa poprawka dla drag & drop na mobile */
    cursor: grab; /* Wizualny wskaźnik możliwości przeciągania */
    border: 2px solid #8a4550; /* Dodatkowa definicja dla lepszego wyglądu */
}

.answer-button.ordering-item:hover {
    background-color: #7d3e47 !important; /* Ciemniejszy bordowy przy najechaniu */
    border-color: #6d3339;
}

.answer-button.ordering-item:active {
    cursor: grabbing;
}

/* Duch podczas przeciągania */
.sortable-ghost-participant {
    opacity: 0.4;
    background: #a8a0e8;
}

/* Element podczas aktywnego przeciągania */
.sortable-drag {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: grabbing !important;
}

/* ----- Responsywność ----- */
/* Dodaj reguły @media dla mniejszych ekranów, jeśli domyślne zachowanie Bootstrapa nie wystarcza */
/* @media (max-width: 768px) { ... } */
/* @media (max-width: 576px) { ... } */