/* ========================================
   Wypożyczalnia Aut – Frontend CSS
   ======================================== */

/* Grid samochodów */
.wa-car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.wa-car-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.wa-car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.wa-car-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wa-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wa-car-image.wa-no-image .dashicons {
    font-size: 64px;
    color: #ccc;
}

.wa-car-info {
    padding: 20px;
}
.wa-car-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #1a1a1a;
}
.wa-car-year {
    display: inline-block;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}
.wa-car-price {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 10px;
}
.wa-car-price small {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}
.wa-car-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Przyciski */
.wa-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}
.wa-btn:active { transform: scale(0.97); }

.wa-btn-reserve {
    background: #2563eb;
    color: #fff !important;
    margin-right: 8px;
}
.wa-btn-reserve:hover { background: #1d4ed8; }

.wa-btn-details {
    background: #f1f5f9;
    color: #334155 !important;
}
.wa-btn-details:hover { background: #e2e8f0; }

.wa-btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Modal */
.wa-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wa-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    animation: waFadeIn 0.25s ease;
}
.wa-modal-wide {
    max-width: 600px;
}
.wa-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    z-index: 10;
}
.wa-modal-close:hover { color: #333; }

@keyframes waFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Formularz */
.wa-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.wa-form-col {
    flex: 1;
}
.wa-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.wa-form-row input[type="text"],
.wa-form-row input[type="email"],
.wa-form-row input[type="tel"],
.wa-form-row input[type="date"],
.wa-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.wa-form-row input:focus,
.wa-form-row textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.wa-form-row textarea {
    resize: vertical;
}

/* Kalkulacja */
.wa-calc-summary {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 15px;
}
.wa-calc-summary p { margin: 4px 0; }

/* Wiadomość formularza */
#wa-form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}
#wa-form-message.wa-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
#wa-form-message.wa-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Checkbox regulaminu */
.wa-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
}
.wa-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}
.wa-show-regulamin {
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
}
.wa-regulamin-text {
    margin-top: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Pojedynczy samochód */
.wa-single-car {
    max-width: 800px;
}
.wa-single-image img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}
.wa-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.wa-gallery-item img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.wa-gallery-item img:hover { opacity: 0.8; }

.wa-price-big {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    margin: 12px 0 16px;
}
.wa-description {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 24px;
}

/* Inline formularz */
.wa-inline-reservation {
    max-width: 600px;
}
.wa-inline-form .wa-form-row {
    margin-bottom: 14px;
}
.wa-price-info {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 20px;
}

/* Modal szczegółów */
.wa-detail-image img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}
.wa-detail-gallery {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.wa-detail-gallery img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsywność */
@media (max-width: 600px) {
    .wa-form-row {
        flex-direction: column;
        gap: 12px;
    }
    .wa-car-grid {
        grid-template-columns: 1fr;
    }
    .wa-modal-content {
        padding: 20px;
        border-radius: 12px;
    }
}

/* Pusty stan */
.wa-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}
