/* Styles for appointment management page */
.manage-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.search-form-container,
.appointments-list-container,
.edit-form-container,
.success-message {
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-form-container h2,
.appointments-list-container h2,
.edit-form-container h2,
.success-message h2 {
    color: #4e5a65;
    margin-bottom: 20px;
    text-align: center;
}

.search-form-container p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

/* Formularz wyszukiwania */
#search-appointment-form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
}

#search-appointment-form label {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

#search-appointment-form input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px;
}

#search-appointment-form button {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

#search-appointment-form button:hover {
    background-color: #0056b3;
}

/* Komunikaty o błędach */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* Lista wizyt */
.appointment-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s;
}

.appointment-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.appointment-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.appointment-info p {
    color: #666;
    margin: 5px 0;
    line-height: 1.6;
}

.appointment-info strong {
    color: #333;
}

.past-appointment {
    color: #dc3545 !important;
    font-style: italic;
    margin-top: 10px;
}

.appointment-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appointment-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.appointment-actions button:first-child {
    background-color: #28a745;
    color: white;
}

.appointment-actions button:first-child:hover {
    background-color: #218838;
}

.appointment-actions button.cancel-button {
    background-color: #dc3545;
    color: white;
}

.appointment-actions button.cancel-button:hover {
    background-color: #c82333;
}

/* Formularz edycji */
.current-appointment-info {
    background-color: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.current-appointment-info h3 {
    color: #0056b3;
    margin-bottom: 10px;
}

.current-appointment-info p {
    margin: 0;
    line-height: 1.8;
}

#edit-appointment-form {
    max-width: 500px;
    margin: 0 auto;
}

#edit-appointment-form label {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    margin-top: 20px;
    font-weight: 500;
}

#edit-appointment-form input,
#edit-appointment-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.form-buttons button {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-buttons button[type="submit"] {
    background-color: #28a745;
    color: white;
}

.form-buttons button[type="submit"]:hover {
    background-color: #218838;
}

.form-buttons button[type="button"] {
    background-color: #6c757d;
    color: white;
}

.form-buttons button[type="button"]:hover {
    background-color: #5a6268;
}

/* Przycisk powrotu */
.back-button {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #5a6268;
}

/* Komunikat sukcesu */
.success-message {
    text-align: center;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.success-message h2 {
    color: #155724;
}

.success-message p {
    font-size: 18px;
    margin: 20px 0;
}

.success-message button {
    padding: 12px 40px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.success-message button:hover {
    background-color: #218838;
}

/* Responsywność */
@media (max-width: 768px) {
    .manage-container {
        margin: 20px;
        padding: 15px;
    }

    .appointment-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .appointment-actions {
        width: 100%;
        margin-top: 15px;
    }

    .appointment-actions button {
        width: 100%;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button {
        width: 100%;
    }

    .search-form-container,
    .appointments-list-container,
    .edit-form-container {
        padding: 20px;
    }

    #search-appointment-form input,
    #search-appointment-form button {
        font-size: 18px;
        padding: 15px;
    }

    #edit-appointment-form input,
    #edit-appointment-form select {
        font-size: 18px;
        padding: 15px;
    }
}

/* Poprawki do modern-calendar.css */

/* Większy kalendarz na desktop */
@media (min-width: 1024px) {
    .calendar .days {
        grid-template-rows: repeat(6, 70px);
        grid-gap: 8px;
    }
    
    .calendar .day {
        font-size: 1.1em;
        font-weight: 600;
        min-height: 70px;
    }
    
    .center-column {
        flex: 2;
        max-width: 600px;
    }
}

/* Poprawka dla listy rezerwowej - domyślnie ukryta */
.waiting-list-section {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 12px;
    border: 2px solid #d4af37;
    animation: slideIn 0.5s ease-out;
}

.waiting-list-section.show {
    display: block;
}

/* Poprawione przyciski akcji */
.action-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-manage, .btn-info {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-manage {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.btn-manage:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: white;
}

.btn-info:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Komunikat o braku terminów */
.no-hours-message {
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #d4af37;
    margin: 15px 0;
}

.no-hours-message p {
    color: #856404;
    margin: 0;
    font-weight: 500;
}

/* Licznik wolnych terminów */
.availability-counter {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.availability-counter.limited {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.availability-counter.full {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.availability-counter h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.availability-counter p {
    margin: 0;
    font-weight: 600;
    color: #1b5e20;
}

.availability-counter.limited p {
    color: #f57c00;
}

.availability-counter.full p {
    color: #c62828;
}

/* Poprawka dla formularza listy rezerwowej */
.waiting-list-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.waiting-list-form input,
.waiting-list-form select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.waiting-list-form input:focus,
.waiting-list-form select:focus {
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.waiting-list-form button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.waiting-list-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* Responsywność dla mobile */
@media (max-width: 768px) {
    .calendar .days {
        grid-template-rows: repeat(6, 60px);
        grid-gap: 4px;
    }
    
    .calendar .day {
        font-size: 1em;
        min-height: 60px;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .btn-manage, .btn-info {
        padding: 14px 24px;
        font-size: 0.95em;
    }
}

/* Animacje */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.btn-info.pulse {
    animation: pulse 2s infinite;
}