/**
 * ParkZone - Style CSS
 * Plik stylów dla systemu rezerwacji parkingu
 */

/* Główny kontener formularza */
#parkzone-booking-form {
    position: relative;
    max-width: 800px;
    margin: 80px auto 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Zablokowany formularz rezerwacji */
#parkzone-booking-form.disabled {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

/* Overlay wyświetlany gdy rezerwacje są wyłączone */
.reservation-disabled-overlay {
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    z-index: 100;
    text-align: center;
}

.reservation-disabled-overlay h3 {
    display: inline-block;
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    text-align: center;
    background: #e74c3c;
    padding: 15px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form rows - układ wierszy formularza */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group.full-width {
    width: 100%;
    margin-bottom: 20px;
}

/* Form groups - grupy pól formularza */
.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="time"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

/* Date inputs - specjalne style dla pól daty */
.form-group input[type="date"] {
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Hover i focus dla pól formularza */
.form-group input:hover,
.form-group textarea:hover {
    border-color: #bbb;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Klasy błędów */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: #fff8f8;
}

.form-group.focused label {
    color: #3498db;
}

/* Checkbox styling */
.form-row.checkboxes {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-group.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #3498db;
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

/* Price calculation section - sekcja obliczania ceny */
.price-calculation {
    background: #3498db;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
}

.price-calculation h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: white;
}

/* Dodatkowe usługi */
.additional-services {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.additional-services h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

#price-details {
    font-size: 16px;
    line-height: 1.6;
    color: white;
}

#price-details p {
    color: rgba(255, 255, 255, 0.9);
}

#price-details strong {
    font-size: 28px;
    color: #f1c40f;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Submit button - przycisk wysyłania */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-submit {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages - komunikaty */
#booking-message {
    margin-top: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 16px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Datepicker custom styles - niestandardowe style dla kalendarza */
.ui-datepicker {
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 10px;
    font-size: 14px;
}

.ui-datepicker-header {
    background: #3498db;
    color: white;
    border-radius: 5px 5px 0 0;
    padding: 10px;
    margin: -10px -10px 10px -10px;
}

.ui-datepicker-title {
    color: white;
    font-weight: bold;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    color: white;
    cursor: pointer;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    opacity: 0.8;
}

.ui-state-default {
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #333;
    text-align: center;
    padding: 5px;
    cursor: pointer;
}

.ui-state-hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.ui-state-active {
    background: #2980b9;
    color: white;
    border-color: #2980b9;
}

.ui-datepicker-today .ui-state-default {
    background: #f39c12;
    color: white;
    font-weight: bold;
}

/* Tooltip - dymki podpowiedzi */
.tooltip {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 4px;
}

/* Responsive design - responsywny układ */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .form-row.checkboxes {
        flex-direction: column;
        gap: 10px;
    }

    #parkzone-booking-form {
        padding: 15px;
    }

    .btn-submit {
        width: 100%;
        padding: 15px 20px;
    }

    .reservation-disabled-overlay h3 {
        font-size: 18px;
        padding: 12px 25px;
    }

    #parkzone-booking-form {
        margin-top: 60px;
    }
}

/* Admin panel styles - style dla panelu administracyjnego */
.wrap .wp-list-table th,
.wrap .wp-list-table td {
    vertical-align: middle;
}

.wrap .button-small {
    margin-right: 5px;
}

/* Loading animation - animacja ładowania */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form validation visual feedback - wizualna informacja zwrotna walidacji */
.form-group input:valid:not(.error) {
    border-color: #27ae60;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Smooth transitions - płynne przejścia */
.btn-submit,
.form-group input,
.form-group textarea,
.ui-datepicker-prev,
.ui-datepicker-next {
    transition: all 0.3s ease;
}

/* Custom scrollbar for textarea - niestandardowy pasek przewijania dla textarea */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* PDF Download Button - przycisk pobierania PDF */
.pdf-download {
    text-align: center;
    margin-top: 20px;
}

.btn-download-pdf {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-download-pdf:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Availability Widget - widget dostępności */
.parkzone-availability-widget {
    max-width: 400px;
    margin: 20px auto;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.parkzone-availability-widget.good {
    border-top: 5px solid #27ae60;
}

.parkzone-availability-widget.warning {
    border-top: 5px solid #f39c12;
}

.parkzone-availability-widget.critical {
    border-top: 5px solid #e74c3c;
}

.availability-header h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #2c3e50;
}

.availability-date {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.availability-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-item.available .stat-number {
    color: #27ae60;
}

.stat-item.occupied .stat-number {
    color: #e74c3c;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
}

.availability-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.availability-fill {
    height: 100%;
    background: linear-gradient(to right, #e74c3c, #f39c12);
    transition: width 0.5s ease;
}

.availability-info {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 15px;
}

/* Admin Panel Styles - style dla panelu administracyjnego */
.wrap .parkzone-availability-widget {
    max-width: 600px;
    margin: 20px 0;
}

/* Status notification - powiadomienie o statusie rezerwacji */
#availability-status {
    transition: all 0.3s ease;
}

#availability-status div {
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: 500;
}

/* Enhanced field styling - ulepszone style pól */
.form-group.focused input,
.form-group.focused textarea {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Responsive availability widget - responsywny widget dostępności */
@media (max-width: 768px) {
    .parkzone-availability-widget {
        margin: 10px;
        padding: 20px;
    }

    .availability-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 28px;
    }

    #price-details strong {
        font-size: 24px;
    }

    .form-group label {
        font-size: 13px;
    }
}

/* Print styles - style do drukowania */
@media print {
    #parkzone-booking-form {
        max-width: 100%;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .btn-submit,
    .form-group.checkbox,
    .form-actions {
        display: none;
    }

    body {
        background: white;
        font-size: 12pt;
    }

    .price-calculation {
        background: #f8f9fa;
        color: #333;
        border: 1px solid #ddd;
    }

    #price-details {
        color: #333;
    }

    #price-details strong {
        color: #e74c3c;
    }
}