/* بطاقة تسعير الكراء اليومي — أسلوب Airbnb */
.pdq-card {
    direction: rtl;
    background: #fff;
    border: 1px solid #dddddd;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 20px;
    margin: 0 auto;
    max-width: 100%;
}

.pdq-price-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.pdq-price-value {
    font-size: 2.6rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    text-align: center;
}

.pdq-unit {
    font-weight: 600;
    font-size: 1.8rem;
    color: #222;
}

.pdq-price-hint {
    font-size: 1.6rem;
    color: #555;
    line-height: 1.5;
}

.pdq-mobile-price {
    display: none;
}

.pdq-mobile-price .product-sale-price-block {
    margin: 0 0 4px;
    max-width: none;
}

.pdq-mobile-price .product-sale-price-line--primary {
    width: 100%;
}

.pdq-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #b0b0b0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.pdq-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: #fff;
    text-align: right;
    cursor: pointer;
    transition: background 0.15s ease;
}

.pdq-field:hover,
.pdq-field.is-active {
    background: #f7f7f7;
}

.pdq-field-checkin {
    border-left: 1px solid #b0b0b0;
}

.pdq-field-label {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #222;
}

.pdq-field-value {
    font-size: 1.6rem;
    color: #717171;
    font-weight: 500;
}

.pdq-field.has-value .pdq-field-value {
    color: #222;
    font-weight: 600;
}

.pdq-calendar-wrap {
    margin: 0 0 14px;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    /* أرقام الأيام واتجاه الشبكة مثل #calendar2 (يسار → يمين) */
    direction: ltr;
    unicode-bidi: isolate;
}

.pdq-calendar-wrap[hidden] {
    display: none !important;
}

.pdq-calendar,
.pdq-calendar .vanilla-calendar {
    width: 100%;
    max-width: 100%;
    direction: ltr;
}

.pdq-calendar .vanilla-calendar-week,
.pdq-calendar .vanilla-calendar-days {
    direction: ltr;
}

/* الإشعارات فوق الأيام يجب أن تظهر خارج حدود الشبكة */
.pdq-calendar .vanilla-calendar-days,
.pdq-calendar .vanilla-calendar-day {
    overflow: visible;
}

/* يوم متاح للمغادرة فقط: حلقة رمادية خفيفة بلا شطب (مثل Départ uniquement) */
.pdq-calendar .pdq-checkout-only {
    color: #c4c3c3 !important;
    text-decoration: none !important;
    box-shadow: inset 0 0 0 1px #dddddd;
    border-radius: 50%;
}

/* إشعار اليوم (يوم الوصول / يوم المغادرة / للمغادرة فقط / الحد الأدنى) */
.pdq-calendar [data-pdq-note] {
    position: relative;
}

.pdq-calendar [data-pdq-note]::after {
    content: attr(data-pdq-note);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #222222;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    direction: rtl;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    z-index: 6;
}

.pdq-calendar [data-pdq-note]:hover::after,
.pdq-calendar [data-pdq-note]:focus::after,
.pdq-calendar .pdq-note-pinned[data-pdq-note]::after {
    opacity: 1;
    visibility: visible;
}

.pdq-submit {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff7800 0%, #ff9a40 100%);
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.pdq-submit:hover:not(:disabled) {
    opacity: 0.95;
}

.pdq-submit:active:not(:disabled) {
    transform: scale(0.99);
}

.pdq-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pdq-result {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ebebeb;
}

.pdq-result[hidden],
.pdq-error[hidden] {
    display: none !important;
}

.pdq-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 1.7rem;
    color: #222;
    margin-bottom: 8px;
}

.pdq-result-row strong {
    font-size: 2.1rem;
    font-weight: 700;
}

.pdq-result-avg {
    color: #717171;
    font-size: 1.6rem;
}

.pdq-result-avg strong {
    font-size: 1.8rem;
    font-weight: 600;
    color: #222;
}

.pdq-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 1.6rem;
    line-height: 1.5;
}

.pdq-error a {
    color: #b91c1c;
    font-weight: 700;
    text-decoration: underline;
}

.pdq-error a:hover {
    color: #7f1d1d;
}

.pdq-mobile-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: right;
    direction: rtl;
    color: #222;
    margin: 18px 0 10px;
}

/* داخل بطاقة التقويم: العنوان للهواتف فقط (سطح المكتب يعتمد على pdq-price-hint) */
.pdq-card > .pdq-mobile-title {
    display: none;
    margin: 0 0 12px;
    font-size: 1.55rem;
}

@media (max-width: 480px) {
    .pdq-card {
        padding: 16px;
    }

    .pdq-fields {
        grid-template-columns: 1fr;
    }

    .pdq-field-checkin {
        border-left: 0;
        border-bottom: 1px solid #b0b0b0;
    }
}

/* موبايل: بطاقة السعر/الاتصال المنقولة أسفل الوصف — جدول خفيف الحواف */
@media (max-width: 767.98px) {
    .pdq-mobile-col,
    .pdq-meta-mobile-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100%;
        float: none !important;
        clear: both;
        margin: 10px 0 14px;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    .pdq-meta-mobile-col {
        margin-bottom: 6px;
    }

    .pdq-meta-mobile-col + .pdq-mobile-col {
        margin-top: 6px;
    }

    .pdq-mobile-block {
        margin: 0;
        clear: both;
        width: 100%;
        max-width: 100%;
    }

    .pdq-mobile-block .pdq-card {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .pdq-mobile-price {
        display: block;
    }

    .pdq-price-hint {
        display: none;
    }

    .pdq-card > .pdq-mobile-title {
        display: block;
    }

    /* السعر داخل بطاقة التقويم — إخفاؤه من أسفل أزرار الاتصال فقط عند وجود pdq-card */
    body:has(.pdq-card) .product-page-meta .product-rent-price-block {
        display: none !important;
    }

    .product-page-meta.product-page-meta--table {
        display: block;
        width: 100%;
        max-width: 100%;
        clear: both;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        border: 1px solid #ececec;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .product-page-meta--table .product-page-meta__actions {
        margin: 0;
        width: 100%;
        padding: 14px;
        text-align: center;
        border-bottom: 0;
    }

    .product-page-meta--table .product-page-meta__price,
    .product-page-meta--table .product-page-meta__price.price,
    .product-page-meta .product-page-meta__price,
    .product-page-meta .product-page-meta__price.price {
        display: none !important;
    }
}
