/* ============================================
 * Reservation Form (rezervasyon-formu.php)
 * Tüm dillerde paylaşılan modern, mobil-uyumlu stil
 * ============================================ */

/* ===== Page Container ===== */
.rf-page {
    padding: clamp(96px, 12vw, 130px) 0 clamp(40px, 6vw, 60px);
    background: linear-gradient(180deg, var(--bg-light, #FAFBFC) 0%, var(--bg-white, #FFF) 100%);
    min-height: calc(100vh - 80px);
}

/* ===== Page Header ===== */
.rf-header {
    text-align: center;
    margin-bottom: clamp(20px, 3vw, 32px);
    padding: 0 8px;
}

.rf-header h1 {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.rf-header p {
    font-size: clamp(0.95rem, 2.4vw, 1.1rem);
    color: var(--text-medium, #555);
    margin: 0;
}

/* ===== Error Banner ===== */
.rf-error {
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
    border: 1px solid #FCA5A5;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 22px;
    color: #991B1B;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.rf-error i {
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-top: 2px;
}

/* ===== Login Prompt ===== */
.rf-login-prompt {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border: 1px solid #93C5FD;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.06);
}

.rf-login-prompt-icon {
    flex-shrink: 0;
    font-size: 2.2rem;
    color: #1D4ED8;
    line-height: 1;
}

.rf-login-prompt-body {
    flex: 1;
    min-width: 0;
}

.rf-login-prompt-body h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #1E3A8A;
    line-height: 1.3;
}

.rf-login-prompt-body p {
    margin: 0;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.5;
}

.rf-login-prompt .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .rf-login-prompt {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }
    .rf-login-prompt .btn {
        width: 100%;
    }
}

/* ===== Form Card (sol kolon) ===== */
.rf-form-card {
    background: var(--bg-white, #FFF);
    border-radius: 16px;
    padding: clamp(18px, 3.5vw, 32px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #F1F5F9;
}

.rf-form-card > h2 {
    font-size: clamp(1.15rem, 3vw, 1.45rem);
    font-weight: 700;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-dark, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-form-card > h2 i {
    color: var(--primary-color, #0066CC);
    font-size: 1.1em;
}

/* ===== Form Section ===== */
.rf-form-section {
    margin-bottom: 22px;
}

.rf-form-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--text-dark, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-form-section h3 i {
    color: var(--primary-color, #0066CC);
}

/* ===== Accordion (Mietzeitraum / Rental Period) ===== */
.rf-accordion-header {
    cursor: pointer;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    user-select: none;
}

.rf-accordion-header:hover {
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    border-color: #CBD5E1;
}

.rf-accordion-header h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-accordion-header h3 i {
    color: var(--primary-color, #0066CC);
}

.rf-accordion-header .rf-accordion-icon {
    transition: transform 0.3s ease;
    color: #64748B;
}

.rf-accordion-header.is-open .rf-accordion-icon {
    transform: rotate(180deg);
}

.rf-accordion-body {
    display: none;
    padding: 16px 0 4px;
    overflow: hidden;
}

.rf-accordion-body.is-open {
    display: block;
    animation: rfFadeIn 0.25s ease;
}

@keyframes rfFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Rental Details Table ===== */
.rf-rental-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFF;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.rf-rental-table tr {
    border-bottom: 1px solid #F1F5F9;
}

.rf-rental-table tr:last-child {
    border-bottom: 0;
}

.rf-rental-table td {
    padding: 12px 14px;
    color: var(--text-dark, #1a1a1a);
    font-size: 0.95rem;
    line-height: 1.5;
    vertical-align: middle;
}

.rf-rental-table td:first-child {
    font-weight: 600;
    color: #475569;
    background: #F8FAFC;
    width: 42%;
    white-space: nowrap;
}

.rf-rental-table .form-control,
.rf-rental-table select.form-control {
    margin: 0;
    padding: 8px 12px;
    width: 100%;
    border-radius: 6px;
}

@media (max-width: 575px) {
    .rf-rental-table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    .rf-rental-table td:first-child {
        width: 45%;
    }
}

/* ===== Warning Box ===== */
.rf-warning {
    display: none;
    background: #FFFBEB;
    border-left: 4px solid #F59E0B;
    padding: 12px 16px;
    margin-top: 14px;
    border-radius: 8px;
    color: #78350F;
    font-size: 0.92rem;
    line-height: 1.5;
}

.rf-warning.is-visible {
    display: block;
}

.rf-warning i {
    color: #B45309;
    margin-right: 6px;
}

.rf-warning strong {
    color: #78350F;
}

/* ===== Form Grid ===== */
.rf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
}

.rf-form-grid .rf-full {
    grid-column: 1 / -1;
}

.rf-form-grid label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px;
}

.rf-form-grid .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #FFF;
    color: var(--text-dark, #1a1a1a);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.rf-form-grid .form-control:focus {
    border-color: var(--primary-color, #0066CC);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
    outline: none;
}

.rf-form-grid textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

@media (max-width: 575px) {
    .rf-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ===== Extras ===== */
.rf-extras-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rf-extra-item {
    position: relative;
}

.rf-extra-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rf-extra-item label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: #FFF;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.rf-extra-item label:hover {
    border-color: #93C5FD;
    background: #F8FAFC;
}

.rf-extra-item input:checked + label {
    border-color: var(--primary-color, #0066CC);
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
}

.rf-extra-item input:focus-visible + label {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.rf-extra-item label > span:first-child {
    flex: 1;
    min-width: 0;
}

.rf-extra-item label strong {
    display: block;
    color: var(--text-dark, #1a1a1a);
    font-size: 0.98rem;
    margin-bottom: 2px;
}

.rf-extra-item label small {
    color: #64748B;
    font-size: 0.83rem;
    line-height: 1.4;
}

.rf-extra-item .rf-extra-price {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--primary-color, #0066CC);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* ===== Form Check (terms / create-account) ===== */
.rf-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    font-size: 0.93rem;
    line-height: 1.5;
}

.rf-form-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-color, #0066CC);
    cursor: pointer;
}

.rf-form-check label {
    cursor: pointer;
    color: #334155;
    user-select: none;
}

.rf-form-check label a {
    color: var(--primary-color, #0066CC);
    text-decoration: underline;
    font-weight: 500;
}

/* Create-account block */
.rf-create-account {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #93C5FD;
    margin: 18px 0;
}

.rf-create-account .rf-form-check {
    margin: 0;
}

.rf-create-account .rf-form-check label {
    font-weight: 600;
    color: #1E40AF;
}

.rf-password-fields {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(147, 197, 253, 0.6);
}

.rf-password-fields.is-visible {
    display: block;
}

.rf-password-fields .rf-form-grid {
    gap: 12px 14px;
}

.rf-password-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #475569;
    font-size: 0.83rem;
}

/* ===== Submit Button ===== */
.rf-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    margin-top: 4px;
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.25);
    letter-spacing: 0.01em;
}

.rf-submit-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.35);
}

.rf-submit-btn i {
    margin-right: 6px;
}

/* ===== Booking / Price Summary Card (sağ kolon) ===== */
.rf-booking-card {
    background: var(--bg-white, #FFF);
    border-radius: 16px;
    padding: clamp(18px, 3.5vw, 26px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #F1F5F9;
    position: sticky;
    top: 100px;
}

@media (max-width: 991px) {
    .rf-booking-card {
        position: static;
        margin-top: 18px;
    }
}

.rf-car-summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.rf-car-summary img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    background: #F1F5F9;
}

.rf-car-summary > div {
    min-width: 0;
}

.rf-car-summary h6 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    line-height: 1.3;
    overflow-wrap: break-word;
}

.rf-car-summary small {
    color: #64748B;
    font-size: 0.85rem;
}

.rf-booking-card > h5 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--text-dark, #1a1a1a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-booking-card > h5 i {
    color: var(--primary-color, #0066CC);
}

.rf-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    color: #334155;
    font-size: 0.95rem;
    gap: 12px;
}

.rf-price-row span:first-child,
.rf-price-row strong:first-child {
    flex: 1;
}

.rf-price-row strong {
    color: var(--text-dark, #1a1a1a);
}

.rf-price-row.rf-total {
    padding-top: 14px;
    border-top: 2px solid #F1F5F9;
    margin-top: 8px;
}

.rf-price-row.rf-total h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.rf-price-row.rf-total h5:last-child {
    color: var(--primary-color, #0066CC);
}

.rf-divider {
    border: 0;
    border-top: 1px solid #F1F5F9;
    margin: 12px 0;
}

.rf-secure-badge {
    margin-top: 16px;
    padding: 12px 14px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #166534;
    font-size: 0.85rem;
    font-weight: 600;
}

.rf-secure-badge i {
    color: #16A34A;
}

/* ===== Mobile Sticky Total Bar ===== */
.rf-mobile-bar {
    display: none;
}

@media (max-width: 991px) {
    .rf-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 950;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-top: 1px solid #E2E8F0;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
        align-items: center;
        gap: 12px;
    }

    .rf-mobile-bar-info {
        flex: 1;
        min-width: 0;
        line-height: 1.2;
    }

    .rf-mobile-bar-info small {
        display: block;
        color: #64748B;
        font-size: 0.78rem;
        font-weight: 500;
    }

    .rf-mobile-bar-info strong {
        display: block;
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--primary-color, #0066CC);
    }

    .rf-mobile-bar .btn {
        flex-shrink: 0;
        padding: 12px 22px;
        font-weight: 700;
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(0, 102, 204, 0.3);
    }

    /* Push page content above the mobile bar */
    .rf-page {
        padding-bottom: 100px;
    }
}

/* ===== Bootstrap row/col fallback (eğer ekstra grid yardımı gerekirse) ===== */
@media (max-width: 991px) {
    .rf-page .col-lg-4,
    .rf-page .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* ===== SweetAlert2 Custom Styles ===== */
.swal-custom-popup {
    border-radius: 16px !important;
    padding: 1.6rem 1.6rem 1.4rem !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18) !important;
}

.swal-custom-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #1E3A8A !important;
    line-height: 1.3 !important;
}

.swal-custom-text {
    font-size: 0.95rem !important;
    color: #334155 !important;
    line-height: 1.6 !important;
}

.swal-custom-text strong {
    color: #0066CC;
    font-weight: 700;
}

.swal2-styled.swal2-confirm {
    border-radius: 10px !important;
    padding: 11px 26px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.25) !important;
}
