/* css/style.css - cały plik */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}
.container {
    max-width: 800px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.header-bar span {
    font-size: 0.9em;
    color: #555;
}
.logout-button {
    background-color: #f44336;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}
.logout-button:hover {
    background-color: #d32f2f;
}
h1, h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}
.upload-section, .schedule-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
input[type="file"], select {
    display: block;
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
button[type="submit"] {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
button[type="submit"]:hover {
    background-color: #4cae4c;
}
.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}
.message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}
.message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}
.stats-container {
    background-color: #e9f5f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    margin-bottom: 20px;
    border: 1px solid #b1dde8; 
}
.stats-container h3 {
    margin-top: 0;
    color: #007bff;
}
.stats-container p {
    margin: 8px 0; 
    font-size: 0.95em;
}
.stats-container span {
    font-weight: bold;
}
#scheduleDisplay {
    margin-top: 20px;
}
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; 
}
.calendar-table th, .calendar-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: top; 
    height: 100px; 
}
.calendar-table th {
    background-color: #f2f2f2;
    text-align: center;
    font-weight: bold;
}
.day-cell .day-number {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    display: block;
}
.day-cell .shift-info {
    font-size: 0.9em;
    word-wrap: break-word; 
}
.shift-annotation {
    display: block; 
    font-size: 0.8em; 
    color: #555;      
    margin-top: 3px;   
}
.empty-day {
    background-color: #f9f9f9;
}
.day-cell.no-work {
    background-color: #e9ecef; 
    opacity: 0.75; 
}
.day-cell.no-work .shift-info { 
    color: #6c757d;      
    font-size: 0.85em;   
    font-style: italic;  
    text-decoration: none; 
}
.day-cell.no-work.clickable-for-leave { 
    cursor: pointer;
    opacity: 0.9; 
}
.day-cell.no-work.clickable-for-leave:hover {
    background-color: #dee2e6; 
    opacity: 1;
}
.day-cell .shift-info.editable { 
    cursor: pointer; 
    text-decoration: underline;
    text-decoration-style: dashed;
    color: #0056b3; 
}
.day-cell .shift-info.editable:hover {
    color: #003d80;
}
.day-cell.is-today {
    background-color: #fffde7; 
    border: 2px solid #ffc107; 
    opacity: 1; 
}
.day-cell.is-today .day-number {
    color: #e65100; 
}
.day-cell.is-tomorrow {
    background-color: #e3f2fd; 
    border: 1px solid #90caf9; 
    opacity: 1; 
}
.day-cell.is-tomorrow .day-number {
    color: #0d47a1; 
}
.day-cell.has-work .shift-info { 
    color: #2e7d32; 
}
.day-cell.is-wolne .shift-info {
    color: #d32f2f; 
}
.day-cell.is-urlop .shift-info { 
    color: #E67E22; 
    font-weight: bold;
}
.day-cell.is-urlop .shift-info.editable {
    text-decoration: underline;
    text-decoration-style: dashed;
}
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; 
    opacity: 0; visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background-color: #fff; padding: 25px 30px; border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    width: 90%; max-width: 450px; text-align: left;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-content h3 { margin-top: 0; color: #333; text-align: center; margin-bottom: 20px; font-size: 1.4em; }
.modal-content p { margin-bottom: 15px; font-size: 1em; }
.modal-content p span { font-weight: bold; }
.modal-content label { display: block; margin-top: 15px; margin-bottom: 8px; font-weight: bold; font-size: 0.95em; }
.time-editor-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    flex-wrap: wrap; /* Twoja zmiana - odnotowana i zachowana */
}
.time-editor-group {
    text-align: center;
    margin-bottom: 10px; /* Dodany margines dla zawijania */
}
.time-editor {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 5px;
}
.time-part {
    font-size: 1.8em;
    font-weight: bold;
    width: 45px;
    text-align: center;
}
.time-separator {
    font-size: 1.5em;
    font-weight: bold;
    padding: 0 5px;
}
.time-adj-btn {
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}
.time-adj-btn:hover {
    background-color: #dde1e5;
}
.annotation-editor-container, .status-editor-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
#modalStatusInput, #modalAnnotationInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; 
}
.modal-actions { margin-top: 25px; text-align: right; display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions button {
    padding: 10px 20px; border: none; border-radius: 5px;
    cursor: pointer; font-size: 1em; transition: background-color 0.2s ease;
}
#modalSaveButton { background-color: #5cb85c; color: white; }
#modalSaveButton:hover { background-color: #4a9b4a; }
#modalCancelButton { background-color: #f0f0f0; color: #333; border: 1px solid #d4d4d4; }
#modalCancelButton:hover { background-color: #e0e0e0; }
#modalErrorMessage { font-size: 0.9em; text-align: center; margin-top:15px;} 
.day-cell .shift-info.modified {
    font-weight: bold; 
    color: #007bff;    
}
.day-cell .shift-info.modified .shift-annotation {
    color: #0056b3; 
}
.legend-container {
    margin-top: 30px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.legend-container h3 {
    margin-top: 0;
    text-align: left;
    font-size: 1.2em;
    margin-bottom: 10px;
}
.legend-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.legend-container li {
    margin-bottom: 8px;
    font-size: 0.9em;
    display: flex; 
    align-items: center;
}
.legend-color-box {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    margin-right: 8px;
    vertical-align: middle;
}
.legend-text-sample {
    margin-right: 8px;
    padding: 2px 4px;
    border: 1px dashed #ccc; 
    line-height: 1.2; 
}
.is-today-legend { background-color: #fffde7; border-color: #ffc107; }
.is-tomorrow-legend { background-color: #e3f2fd; border-color: #90caf9; }
.has-work-legend { background-color: #fff; } 
.no-work-legend { background-color: #e9ecef; opacity: 0.75; } 
.modified-legend { font-weight: bold; color: #007bff; } 
.is-urlop-legend-text { color: #E67E22; font-weight: bold; border-color: #E67E22 !important; }
.is-wolne-legend-text { color: #d32f2f; border-color: #d32f2f !important; }
.legend-container em { display: block; margin-top: 10px; font-size: 0.85em; color: #555; }

/* ---- NOWE STYLE DLA WIDOKU MOBILNEGO ---- */
.schedule-list-view {
    display: none; /* Domyślnie ukryty na desktopie */
}
.list-day-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.list-day-entry:last-child {
    border-bottom: none;
}
.list-day-info {
    font-weight: bold;
}
.list-day-info .list-day-of-week {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
    margin-left: 8px;
}
.list-shift-info {
    font-size: 0.95em;
    text-align: right;
}

/* Wyróżnienia dla widoku listy */
.list-day-entry.is-today { background-color: #fffde7; }
.list-day-entry.is-tomorrow { background-color: #e3f2fd; }
.list-day-entry.no-work { color: #888; background-color: #f8f9fa; }
.list-shift-info.modified { color: #007bff; font-weight: bold; }
.list-shift-info.is-urlop { color: #E67E22; font-weight: bold; }
.list-shift-info.is-wolne { color: #d32f2f; }

@media (max-width: 768px) {
    .calendar-table {
        display: none; /* Ukryj tabelę kalendarza na mobile */
    }
    .schedule-list-view {
        display: block; /* Pokaż widok listy na mobile */
    }
    .container {
        padding: 10px; /* Mniejszy padding na mobile */
    }
    .time-editor-container {
        flex-direction: column; /* Ustawienie grup jedna pod drugą na mobile */
        align-items: center;
    }
}