/*
 * وحدة المواعيد في واجهة المتجر.
 *
 * الألوان تُشتقّ من متغيّر الثيم `--user-base-color` الذي يضبطه كل تاجر، فلا
 * لونَ ثابتاً هنا إلا احتياطاً — البطاقة يجب أن تتبع هوية المتجر لا هويّتنا.
 * والاتجاه متروك للمتصفّح: خصائص منطقية لا left/right.
 */

.appointment-area {
    /* `--main-color` هو ما تضبطه styles.blade.php من لون المتجر — وهو الذي
       تتبعه بقيّة الصفحات. الاحتياط أخضر لئلا تبيضّ الفتحة إن غاب. */
    --appt-accent: var(--main-color, #16a34a);
    --appt-accent-hover: var(--hover-color, var(--appt-accent));
    --appt-line: rgba(0, 0, 0, .09);
    --appt-muted: #6b7280;
}

.appt-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--appt-line);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow .2s ease;
}

.appt-card:hover {
    box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .35);
}

.appt-card__img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.appt-card__body {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.appt-card__title,
.appt-card__body h3,
.appt-card__body h4 {
    margin: 0 0 10px;
    font-weight: 700;
    line-height: 1.45;
}

.appt-card__summary,
.appt-card__desc {
    color: var(--appt-muted);
    font-size: .92rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.appt-card__meta {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    border-top: 1px solid var(--appt-line);
}

.appt-card__meta li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--appt-line);
    font-size: .9rem;
}

.appt-card__meta span {
    color: var(--appt-muted);
}

.appt-card__meta strong {
    font-weight: 600;
}

/* ------------------------------------------------------------- الحقول */

.appt-field {
    margin-bottom: 15px;
}

.appt-field label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.appt-field input,
.appt-field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--appt-line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: inherit;
}

.appt-field input:focus,
.appt-field textarea:focus {
    outline: 2px solid var(--appt-accent);
    outline-offset: 1px;
    border-color: var(--appt-accent);
}

/* ------------------------------------------------------------- الفتحات */

.appt-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
    align-content: flex-start;
}

.appt-slots__hint {
    color: var(--appt-muted);
    font-size: .88rem;
    margin: 0;
    align-self: center;
}

.appt-slot {
    /* الفتحة زرٌّ لا مجرّد نصّ: تُنقر بالإصبع، فلها مساحةُ لمسٍ كافية */
    min-width: 74px;
    padding: 9px 12px;
    border: 1px solid var(--appt-line);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.appt-slot:hover {
    border-color: var(--appt-accent);
}

.appt-slot:focus-visible {
    outline: 2px solid var(--appt-accent);
    outline-offset: 2px;
}

.appt-slot.is-selected {
    background: var(--appt-accent);
    border-color: var(--appt-accent);
    color: #fff;
    font-weight: 600;
}

/* ------------------------------------------------------------- الزرّ */

.appt-btn {
    display: inline-block;
    padding: 12px 22px;
    border: 1px solid var(--appt-accent);
    border-radius: 8px;
    background: var(--appt-accent);
    color: #fff;
    font-weight: 600;
    font-size: .94rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    margin-top: auto;
    transition: filter .15s ease;
}

.appt-btn:hover,
.appt-btn:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(.92);
}

.appt-btn--block {
    display: block;
    width: 100%;
}

.appt-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    filter: none;
}

/* ------------------------------------------------------------ التنبيه */

.appt-alert {
    padding: 11px 14px;
    border-radius: 8px;
    background: #fdecef;
    border: 1px solid #f4c2cb;
    color: #96233a;
    font-size: .9rem;
    margin-bottom: 15px;
}

/* ------------------------------------------------------------ التأكيد */

.appt-done__number {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 1.05rem;
    letter-spacing: .04em;
    color: var(--appt-accent);
    margin-bottom: 18px;
}

.appt-done__meta {
    text-align: start;
    margin-bottom: 22px;
}

@media (prefers-reduced-motion: reduce) {
    .appt-card,
    .appt-slot,
    .appt-btn {
        transition: none;
    }
}
