/* =====================================================================
   Rental Booking — Kiralık ekipman takvim & rezervasyon UI (v2 redesign)
   Design system: Brand Green #1A6355, Accent #b9475e, Light Orange #e79275
   Staggered reveal + micro-interactions (CLAUDE.md Kural 3).
   DOM id'leri korunur (rental-booking.js ile uyumlu).
   ===================================================================== */
.rental-box {
    position: relative;
    border: 1px solid #e9e4df;
    border-radius: 14px;
    padding: 20px;
    font-family: 'Fira Sans', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
    margin-top: 10px;
    box-shadow: 0 8px 24px -14px rgba(26, 99, 85, .35), 0 0 0 1px rgba(0,0,0,.015);
    overflow: hidden;
}
/* İnce üst vurgu şeridi */
.rental-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #1A6355 0%, #2e8c78 45%, #e79275 100%);
}

/* Staggered reveal: kutunun blokları sırayla belirir */
.rental-box > * {
    opacity: 0;
    transform: translateY(12px);
    animation: rbReveal .5s cubic-bezier(.16,1,.3,1) forwards;
}
.rental-box > .rental-head        { animation-delay: .04s; }
.rental-box > .rental-calendar    { animation-delay: .10s; }
.rental-box > .rental-range       { animation-delay: .16s; }
.rental-box > .rental-operator    { animation-delay: .20s; }
.rental-box > .rental-summary     { animation-delay: .22s; }
.rental-box > .rental-book-btn    { animation-delay: .26s; }
.rental-box > .rental-msg         { animation-delay: .28s; }
@keyframes rbReveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rental-box > * { animation: none; opacity: 1; transform: none; }
}
/* Dinamik açılan bloklar (JS ile display:none→block) staggered reveal'dan HARİÇ —
   aksi halde gösterildiklerinde opacity:0'da kalıp görünüp kayboluyorlardı. Kendi
   rentalFade animasyonları var. */
.rental-box > #rentalHours,
.rental-box > #rentalSummary,
.rental-box > #rentalSuccess { opacity: 1 !important; transform: none !important; }

/* Başarı paneli (randevu oluşunca) */
.rental-success { text-align: center; padding: 10px 8px 4px; animation: rentalFade .4s cubic-bezier(.16,1,.3,1); }
.rs-check {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
    background: linear-gradient(135deg, #1A6355 0%, #2e8c78 100%); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(26,99,85,.7);
}
.rs-check svg { width: 34px; height: 34px; }
.rs-title { font-family: 'Barlow Condensed','Fira Sans',sans-serif; font-size: 22px; font-weight: 700; color: #1A6355; margin-bottom: 6px; }
.rs-desc { font-size: 13.5px; color: #595959; line-height: 1.55; margin-bottom: 16px; }
.rs-link {
    display: inline-block; background: linear-gradient(135deg, #b9475e 0%, #d05e72 100%); color: #fff !important;
    text-decoration: none; padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
    box-shadow: 0 10px 22px -10px rgba(185,71,94,.75); transition: transform .14s, box-shadow .2s;
}
.rs-link:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(185,71,94,.85); }
.rs-again { display: block; margin: 12px auto 0; background: none; border: 0; color: #7d91a3; font-size: 13px; cursor: pointer; text-decoration: underline; }
.rs-again:hover { color: #1A6355; }

/* Header */
.rental-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.rental-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #1A6355 0%, #2e8c78 100%);
    color: #fff; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; padding: 6px 12px; border-radius: 999px;
    box-shadow: 0 4px 10px -4px rgba(26,99,85,.6);
}
.rental-badge::before { content: '🚜'; font-size: 13px; }
.rental-price-line { text-align: right; line-height: 1.05; }
.rental-daily {
    font-family: 'Barlow Condensed', 'Fira Sans', sans-serif;
    font-size: 30px; font-weight: 700; color: #b9475e; letter-spacing: .3px;
}
.rental-daily-unit { font-size: 13px; color: #7d91a3; font-weight: 500; }

/* Kiralama tipi: Saatlik ↔ Tüm gün (segmented) */
.rental-mode-switch { display: flex; gap: 4px; background: #f3efe9; border-radius: 11px; padding: 4px; margin-bottom: 8px; }
.rms-btn {
    flex: 1; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px;
    font-family: 'Fira Sans', sans-serif; font-size: 13.5px; font-weight: 600; color: #7d91a3; cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.rms-btn.active { background: #fff; color: #1A6355; box-shadow: 0 3px 8px -4px rgba(26,99,85,.55); }
.rms-btn:hover:not(.active) { color: #1A6355; }
.rental-mode-note { font-size: 11.5px; color: #a79e97; margin: 0 2px 12px; line-height: 1.4; }

/* Calendar */
.rental-calendar {
    border: 1px solid #efe9e2; border-radius: 12px; padding: 14px;
    margin-bottom: 14px; background: #fff;
}
.rc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rc-title {
    font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600;
    color: #1A6355; text-transform: capitalize;
}
.rc-nav {
    background: #FFF3E5; border: 0; color: #1A6355; width: 32px; height: 32px; border-radius: 50%;
    font-size: 19px; cursor: pointer; line-height: 1; transition: background .2s, transform .15s;
    display: flex; align-items: center; justify-content: center;
}
.rc-nav:hover:not(:disabled) { background: #e79275; color: #fff; transform: scale(1.08); }
.rc-nav:disabled { opacity: .3; cursor: not-allowed; }
.rc-weekdays, .rc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rc-weekdays { margin-bottom: 6px; }
.rc-weekdays span { text-align: center; font-size: 11px; color: #a79e97; font-weight: 700; text-transform: uppercase; }
.rc-day {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    font-size: 13.5px; border-radius: 9px; cursor: pointer; color: #4D4D4D; font-weight: 500;
    transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
    user-select: none;
}
.rc-day.rc-empty { cursor: default; }
.rc-day.rc-avail:hover {
    background: #FFF3E5; color: #1A6355; transform: translateY(-1px) scale(1.06);
    box-shadow: 0 4px 10px -5px rgba(231,146,117,.8);
}
.rc-day.rc-past, .rc-day.rc-booked {
    color: #cfc7c1; background: #f6f4f2; cursor: not-allowed;
}
.rc-day.rc-past { text-decoration: line-through; }
.rc-day.rc-booked {
    background: repeating-linear-gradient(45deg, #ffe9e2, #ffe9e2 4px, #ffe0d6 4px, #ffe0d6 8px);
    color: #d63e2e; text-decoration: none;
}
.rc-day.rc-selected {
    background: linear-gradient(135deg, #1A6355 0%, #2e8c78 100%) !important;
    color: #fff !important; font-weight: 700; transform: scale(1.04);
    box-shadow: 0 6px 14px -6px rgba(26,99,85,.8);
}
.rc-day.rc-inrange { background: #d8efe8; color: #1A6355; border-radius: 4px; }

.rc-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 11px; color: #8a9aa6; }
.rc-leg { display: flex; align-items: center; gap: 6px; }
.rc-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.rc-dot-sel { background: linear-gradient(135deg, #1A6355, #2e8c78); }
.rc-dot-booked { background: #ffe0d6; border: 1px solid #d63e2e; }

/* Seçilen aralık */
.rental-range {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: linear-gradient(135deg, #f3faf8 0%, #fff 100%);
    border: 1px solid #e0efea; border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; font-size: 13px;
}
.rr-label { color: #7d91a3; }
.rr-value { color: #1A6355; font-weight: 700; }

/* Operatör seçeneği */
.rental-operator {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 15px; border: 1px solid #e9e4df; border-radius: 11px; margin-bottom: 12px; cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.rental-operator:hover { border-color: #1A6355; box-shadow: 0 4px 12px -8px rgba(26,99,85,.5); background: #fcfffe; }
.ro-text strong { display: block; font-size: 14px; color: #1A6355; }
.ro-text small { font-size: 12px; color: #b9475e; font-weight: 600; }
.ro-toggle { position: relative; width: 48px; height: 27px; flex: 0 0 48px; }
.ro-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ro-slider { position: absolute; inset: 0; background: #d1c9c3; border-radius: 27px; transition: background .25s; }
.ro-slider::before {
    content: ''; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .28s cubic-bezier(.16,1,.3,1);
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.ro-toggle input:checked + .ro-slider { background: linear-gradient(135deg, #1A6355, #2e8c78); }
.ro-toggle input:checked + .ro-slider::before { transform: translateX(21px); }

/* Özet */
.rental-summary {
    background: linear-gradient(135deg, #f7f4ef 0%, #fdfbf8 100%);
    border: 1px solid #efe9e2; border-radius: 11px; padding: 13px 15px; margin-bottom: 13px;
    animation: rentalFade .35s cubic-bezier(.16,1,.3,1);
}
@keyframes rentalFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.rs-row { display: flex; justify-content: space-between; font-size: 14px; color: #595959; padding: 4px 0; }
.rs-total {
    font-weight: 700; color: #1A6355; font-size: 19px;
    border-top: 1px dashed #d8d0ca; margin-top: 8px; padding-top: 10px;
}
.rs-total span:last-child { color: #b9475e; }

/* CTA */
.rental-book-btn {
    width: 100%; border: 0; cursor: pointer;
    padding: 14px 18px; border-radius: 11px; font-size: 16px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #b9475e 0%, #d05e72 100%);
    box-shadow: 0 10px 22px -10px rgba(185,71,94,.75);
    transition: transform .14s ease, box-shadow .2s ease, background .25s ease, opacity .2s;
}
.rental-book-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e79275 0%, #ecaa8c 100%);
    transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(231,146,117,.85);
}
.rental-book-btn:active:not(:disabled) { transform: translateY(0); }
.rental-book-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.rental-msg { font-size: 13px; margin-top: 11px; min-height: 18px; text-align: center; line-height: 1.4; }
.rental-msg.err { color: #d63e2e; }
.rental-msg.ok { color: #1A6355; font-weight: 700; }

/* Saatlik: saat aralığı seçici */
.rental-hours {
    background: linear-gradient(135deg, #f3faf8 0%, #fff 100%);
    border: 1px solid #e0efea; border-radius: 11px; padding: 13px 15px; margin-bottom: 12px;
    animation: rentalFade .35s cubic-bezier(.16,1,.3,1);
}
.rh-title { font-size: 12.5px; color: #1A6355; font-weight: 700; margin-bottom: 10px; }
.rh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rh-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rh-label { font-size: 12px; color: #7d91a3; font-weight: 600; }
.rental-box .rh-select {
    -webkit-appearance: menulist !important; appearance: menulist !important;
    width: 100% !important; box-sizing: border-box; height: auto !important; min-height: 42px;
    padding: 10px 12px !important; border: 1px solid #d8d0ca !important; border-radius: 9px !important;
    font-family: 'Fira Sans', sans-serif; font-size: 15px; color: #1A6355; background: #fff !important;
    cursor: pointer; pointer-events: auto !important; opacity: 1 !important;
    transition: border-color .18s, box-shadow .18s;
}
.rental-box .rh-select:focus { outline: none; border-color: #1A6355; box-shadow: 0 0 0 3px rgba(26,99,85,.12); }
/* selectBox (.sbHolder) ile sarıldığında booking kutusunda tam genişlik */
.rental-box .rh-col .sbHolder { width: 100% !important; height: 42px; border-radius: 9px; }
.rental-box .rh-col .sbHolder .sbSelector { line-height: 42px !important; height: 42px; }
.rh-note { font-size: 12px; color: #7d91a3; margin-top: 8px; }

/* Kiralama koşulları / sözleşme onayı */
.rental-contract {
    background: #fbf9f6; border: 1px solid #ece7e1; border-radius: 11px; padding: 13px 15px; margin-bottom: 12px;
}
.rc-head {
    display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #1A6355;
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: .3px;
}
.rc-head svg { color: #e79275; flex: 0 0 15px; }
.rc-terms { font-size: 12.5px; color: #595959; line-height: 1.55; margin-bottom: 10px; }
.rc-terms strong { color: #1A6355; }
.rc-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; color: #4D4D4D; line-height: 1.45; }
.rc-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: #1A6355; cursor: pointer; flex: 0 0 17px; }

@media (max-width: 400px) {
    .rental-box { padding: 16px; }
    .rental-daily { font-size: 26px; }
}
