/* یارا بوکینگ — فرانت‌اند */

/* ── فرم رزرو ─────────────────────────────────────────────────────────────── */
.yara-booking-wrap { direction: rtl; font-family: inherit; }

.yara-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 24px;
    max-width: 560px;
}

.yara-row { display: flex; gap: 16px; margin-bottom: 16px; }
.yara-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.yara-col label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.yara-req { color: #c00; }

.yara-col input,
.yara-col select {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.yara-col input:focus,
.yara-col select:focus {
    border-color: #617b66a6 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,.15);
}
.yara-date-input { cursor: pointer; }

/* ── وضعیت موجودی ─────────────────────────────────────────────────────────── */
.yara-avail-status {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}
.yara-checking { background: #f5f5f5; color: #666; }
.yara-avail-ok { background: #d4edda; color: #155724; }
.yara-avail-no { background: #f8d7da; color: #721c24; }

/* ── باکس قیمت ────────────────────────────────────────────────────────────── */
.yara-price-box {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #0c5460;
    margin-bottom: 16px;
}
.yara-price-box strong { font-size: 16px; }

/* ── خطا ──────────────────────────────────────────────────────────────────── */
.yara-form-error {
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    margin-bottom: 12px;
}
.yara-error { color: #c00; }

/* ── دکمه ارسال ───────────────────────────────────────────────────────────── */
.yara-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--e-global-color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.yara-submit-btn:hover:not(:disabled) { background: #005a87; }
.yara-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

/* ── تقویم ────────────────────────────────────────────────────────────────── */
.yara-dp-popup {
    position: fixed;
    z-index: 9999999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
    width: 272px;
    direction: rtl;
    user-select: none;
}

.ydp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ydp-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #0073aa;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1;
}
.ydp-header button:hover { background: #f0f6fc; }
.ydp-title { font-weight: 700; font-size: 15px; color: #222; }

.ydp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.ydp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ydp-day,
.ydp-empty {
    text-align: center;
    padding: 7px 2px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    transition: background .1s;
}
.ydp-day:hover:not(.ydp-past):not(.ydp-booked):not(.ydp-closed)  { background: #e8f4fd; }
.ydp-day.ydp-today             { font-weight: bold; color:var(--e-global-color-primary); }
.ydp-day.ydp-past              { color: #ccc; cursor: default; }
.ydp-day.ydp-avail             { color: #2d6a4f; }
.ydp-day.ydp-avail em          { color: #4caf50; }
.ydp-day.ydp-booked            { color: #bbb; background: #f2f2f2; cursor: not-allowed; }
.ydp-day.ydp-closed            { color: #bbb; background: #f5f0f0; cursor: not-allowed; }
.ydp-day.ydp-checkin           { background: #0073aa; color: #fff; border-radius: 5px 0 0 5px; }
.ydp-day.ydp-checkout          { background: #0073aa; color: #fff; border-radius: 0 5px 5px 0; }
.ydp-day.ydp-checkin.ydp-checkout { border-radius: 5px; }
.ydp-day.ydp-range             { background: #e8f4fd; border-radius: 0; }

.ydp-hint {
    margin-top: 8px;
    font-size: 11px;
    color: #888;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 6px;
}

/* ── صفحه مرحله ۲ ────────────────────────────────────────────────────────── */
.yara-booking-info-wrap { direction: rtl; max-width: 560px; margin: 0 auto; }
.yara-summary-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.yara-summary-title { margin: 0 0 14px; font-size: 17px; }
.yara-form-section-title { margin: 0 0 16px; font-size: 17px; }

/* ── صفحه پرداخت ──────────────────────────────────────────────────────────── */
.yara-payment-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.yara-payment-success,
.yara-payment-pending {
    text-align: center;
    margin-bottom: 20px;
}
.yara-icon-check { font-size: 48px; color: #28a745; display: block; }
.yara-icon-clock { font-size: 40px; display: block; margin-bottom: 8px; }
.yara-payment-success h2 { color: #155724; }
.yara-payment-pending h2 { color: #444; }
.yara-hint { font-size: 13px; color: #666; }

.yara-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.yara-summary-table th,
.yara-summary-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-align: right; }
.yara-summary-table th { color: #666; font-weight: 600; width: 40%; }
.yara-total-row th,
.yara-total-row td { border-top: 2px solid #ddd; border-bottom: none; }

.yara-pay-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: #28a745;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
    box-sizing: border-box;
}
.yara-pay-btn:hover { background: #1e7e34; color: #fff; }

.yara-notice { font-size: 13px; color: #666; text-align: center; padding: 10px; }
.yara-notice-success { color: #155724; background: #d4edda; border-radius: 6px; }

/* ── تقویم موجودی ────────────────────────────────────────────────────────── */
.yara-avail-cal { direction: rtl; font-family: inherit; }

.yac {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 24px 28px 20px;
    max-width: 820px;
}

/* ── حالت دوماه (دسکتاپ ≥ 992px) ──────────────────────────────────────── */
.yac.yac-dual {
    max-width: 1120px;
}

.yac-months-wrap {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    direction: rtl;
}

.yac-months-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    min-width: 0;
}

/* خط جداکننده بین دو ماه */
.yac-months-row .yac-m:first-child {
    border-left: 1px solid #efefef;
    padding-left: 20px;
}
.yac-months-row .yac-m:last-child {
    padding-right: 20px;
}

/* دکمه‌های ناوبری بیرونی در حالت دوماه */
.yac-dual .yac-nav {
    flex-shrink: 0;
    margin-top: 2px;
}

/* هدر ماه در حالت دوماه — بدون دکمه، عنوان مرکزی */
.yac-mhdr-plain {
    justify-content: center;
}

.yac-month-wrap { width: 100%; }

.yac-mhdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 15px;
    color: #2d6a4f;
    direction: rtl;
}

.yac-nav {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    padding: 2px 8px;
    border-radius: 50%;
    line-height: 1.3;
}
.yac-nav:hover { background: #f0f0f0; color: #222; }

.yac-wdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}

.yac-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.yac-day,
.yac-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2px;
    border-radius: 7px;
    cursor: pointer;
    user-select: none;
    height: 54px;
    overflow: hidden;
    transition: background .1s;
}

/* حالت در حال بارگذاری — فقط عدد روز، کمرنگ */
.yac-loading-cell { color: #d8d8d8; cursor: default; }

.yac-day b  { font-size: 13px; line-height: 1.2; font-weight: 600; }
.yac-day em { font-style: normal; font-size: 10px; display: block; margin-top: 2px; opacity: .85; }

.yac-avail       { color: #2d6a4f; }
.yac-avail:hover { background: #e8f5e9; }
.yac-avail em    { color: #4caf50; }

.yac-past     { color: #ccc; background: #f7f7f7; cursor: default; }
.yac-past em  { color: #ccc; }

.yac-booked   { color: #bbb; background: #f2f2f2; cursor: not-allowed; }
.yac-closed   { color: #bbb; background: #f5f0f0; cursor: not-allowed; }

.yac-ci,
.yac-co {
    background: #5c6bc0 !important;
    color: #fff !important;
    border-radius: 7px !important;
}
.yac-ci em, .yac-co em { color: rgba(255,255,255,.75) !important; }
.yac-ci:not(.yac-co) { border-radius: 7px 0 0 7px !important; }
.yac-co:not(.yac-ci) { border-radius: 0 7px 7px 0 !important; }

.yac-range { background: #e8eaf6; border-radius: 0; }
.yac-hover { background: #ede7f6; border-radius: 0; }

.yac-today:not(.yac-ci):not(.yac-co) b { color: #1565c0; font-weight: 800; }

.yac-info {
    margin-top: 18px;
    padding: 14px 18px;
    background: #f5faf6;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    font-size: 14px;
    min-height: 72px;
    display: flex;
    align-items: center;
    transition: opacity .15s;
}

.yac-info.yac-info-hidden {
    opacity: 0;
    pointer-events: none;
}

.yac-summary { width: 100%; }

.yac-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.yac-s-dates  { color: #444; }
.yac-s-nights { color: #888; font-size: 13px; }
.yac-s-price  { font-size: 16px; color: #2d6a4f; font-weight: 700; }

.yac-book {
    margin-right: auto;
    display: inline-block;
    background: #2d6a4f;
    color: #fff !important;
    padding: 9px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s;
}
.yac-book:hover { background: #1b4332; }

.yac-loading { color: #999; font-size: 13px; }
.yac-err     { color: #c00; font-size: 13px; margin: 0; }

/* ── ریسپانسیو ────────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
    .yara-row { flex-direction: column; gap: 0; }
    .yara-col { margin-bottom: 14px; }
    .yara-dp-popup { width: calc(100vw - 16px); left: 8px !important; }
}
