/* ─────────────────────────────────────────────────────────────
   customer.css  —  shared across all customer-facing pages
   Assumes auth.css is also loaded (provides reset, navbar, alerts)
───────────────────────────────────────────────────────────── */

/* ── Page shell ─────────────────────────────────────────────── */
.page-wrap {
    max-width: 1080px;
    margin: 2.25rem auto;
    padding: 0 1.5rem;
}

.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.75rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a2e;
}

.page-header .sub {
    font-size: .85rem;
    color: #6b7280;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,.07);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f3f4f6;
}

/* ── Filter bar (services/index) ─────────────────────────────── */
.filter-bar {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    padding: .9rem 1.1rem;
    margin-bottom: 1.75rem;
}

.filter-bar input,
.filter-bar select {
    flex: 1 1 140px;
    padding: .55rem .8rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: .875rem;
    font-family: inherit;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color .15s;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #6366f1;
    background: #fff;
}

.filter-bar .btn-filter {
    padding: .55rem 1.2rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.filter-bar .btn-filter:hover { background: #4338ca; }

.filter-bar .btn-clear {
    padding: .55rem .9rem;
    background: #f3f4f6;
    color: #6b7280;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: .875rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.filter-bar .btn-clear:hover { background: #e5e7eb; color: #374151; text-decoration: none; }

/* ── Services grid ───────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
}

.svc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
}
.svc-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }

.svc-card .cat-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6366f1;
    background: #eef2ff;
    padding: .18rem .55rem;
    border-radius: 20px;
    margin-bottom: .55rem;
    align-self: flex-start;
}

.svc-card h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: .3rem;
    line-height: 1.35;
}

.svc-card .by {
    font-size: .78rem;
    color: #6b7280;
    margin-bottom: .5rem;
}

.svc-card .rating-line {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: #6b7280;
    margin-bottom: .5rem;
}

.stars { color: #f59e0b; letter-spacing: .5px; }

.svc-card .price-row {
    margin-top: auto;
    padding-top: .75rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.svc-card .price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #4f46e5;
}

.svc-card .price-type {
    font-size: .73rem;
    color: #9ca3af;
    font-weight: 400;
}

.svc-card .city-line {
    font-size: .75rem;
    color: #9ca3af;
    margin-top: .4rem;
}

.btn-view {
    display: block;
    margin-top: .9rem;
    text-align: center;
    padding: .5rem;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 7px;
    font-size: .83rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.btn-view:hover { background: #e0e7ff; text-decoration: none; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: #9ca3af;
}
.empty-state .icon { font-size: 2.8rem; margin-bottom: .6rem; }
.empty-state p { font-size: .9rem; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination-wrap {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .3rem;
}
.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .6rem;
    border-radius: 7px;
    font-size: .83rem;
    border: 1.5px solid #e5e7eb;
    color: #4f46e5;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.pagination-wrap a:hover { background: #eef2ff; border-color: #a5b4fc; }
.pagination-wrap .active span,
.pagination-wrap span[aria-current="page"] span {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.pagination-wrap span[aria-disabled="true"] { opacity: .4; cursor: default; }

/* ── Service detail layout ───────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media(max-width: 820px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.detail-main .svc-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: .4rem;
    line-height: 1.25;
}

.detail-main .svc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.2rem;
    align-items: center;
}

.detail-main .svc-meta .tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.tag-cat  { background: #eef2ff; color: #4f46e5; }
.tag-type { background: #f0fdf4; color: #16a34a; }

.detail-main .svc-desc {
    font-size: .92rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Provider info box */
.provider-box {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}

.provider-box h3 {
    font-size: .85rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: .7rem;
}

.provider-box .pname {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: .25rem;
}

.provider-box .prating {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .83rem;
    color: #6b7280;
    margin-bottom: .35rem;
}

.provider-box .pbio {
    font-size: .83rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: .5rem;
}

.provider-box .pexp {
    font-size: .8rem;
    color: #9ca3af;
}

/* Availability pills */
.avail-wrap {
    margin-bottom: 1.5rem;
}
.avail-wrap h4 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #6b7280;
    margin-bottom: .5rem;
}
.day-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.day-pill {
    padding: .25rem .7rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
}
.day-pill .time {
    font-weight: 400;
    color: #047857;
    font-size: .7rem;
    display: block;
}

/* Reviews section */
.reviews-section { margin-top: 2.5rem; }
.reviews-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e5e7eb;
}
.review-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.review-item:last-child { border-bottom: none; }
.review-meta {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .35rem;
}
.review-author { font-size: .875rem; font-weight: 700; color: #1a1a2e; }
.review-date   { font-size: .75rem; color: #9ca3af; }
.review-text   { font-size: .875rem; color: #374151; line-height: 1.55; }

/* ── Booking sidebar ─────────────────────────────────────────── */
.booking-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    padding: 1.5rem;
    position: sticky;
    top: 72px;
}

.booking-box .price-hero {
    text-align: center;
    margin-bottom: 1.25rem;
}
.booking-box .price-hero .amount {
    font-size: 2rem;
    font-weight: 800;
    color: #4f46e5;
}
.booking-box .price-hero .per {
    font-size: .85rem;
    color: #9ca3af;
}

.booking-box .form-label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: .35rem;
    margin-top: .9rem;
}
.booking-box .form-label:first-of-type { margin-top: 0; }

.booking-box input,
.booking-box textarea,
.booking-box select {
    display: block;
    width: 100%;
    padding: .6rem .8rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: .875rem;
    font-family: inherit;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color .15s;
    -webkit-appearance: none;
}
.booking-box input:focus,
.booking-box textarea:focus,
.booking-box select:focus {
    border-color: #6366f1;
    background: #fff;
}
.booking-box textarea { resize: vertical; min-height: 80px; }

.booking-box .is-invalid { border-color: #ef4444 !important; }
.field-error { color: #dc2626; font-size: .75rem; margin-top: .25rem; display: block; }

.btn-book {
    display: block;
    width: 100%;
    margin-top: 1.2rem;
    padding: .75rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    text-align: center;
    text-decoration: none;
}
.btn-book:hover { background: #4338ca; text-decoration: none; }

.login-to-book {
    text-align: center;
    padding: 1rem;
    font-size: .875rem;
    color: #6b7280;
}

/* ── Bookings table ──────────────────────────────────────────── */
.bookings-table-wrap { overflow-x: auto; }

table.bookings {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
table.bookings th {
    text-align: left;
    padding: .6rem .9rem;
    color: #6b7280;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    background: #f9fafb;
    border-bottom: 1.5px solid #e5e7eb;
}
table.bookings td {
    padding: .8rem .9rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1a1a2e;
    vertical-align: top;
}
table.bookings tr:last-child td { border-bottom: none; }
table.bookings tr:hover td { background: #fafafa; }

/* ── Status badges ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .22rem .65rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-completed { background: #e0e7ff; color: #3730a3; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }

/* ── Review inline form ──────────────────────────────────────── */
.review-inline {
    margin-top: .75rem;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

.review-inline h4 {
    font-size: .8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: .65rem;
}

.star-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: .2rem;
    margin-bottom: .75rem;
}

.star-group input[type="radio"] {
    display: none;
}

.star-group label {
    font-size: 1.6rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color .1s;
    line-height: 1;
    padding: 0 .05rem;
}

/* Highlight hovered star and all before it (RTL trick) */
.star-group label:hover,
.star-group label:hover ~ label,
.star-group input[type="radio"]:checked ~ label {
    color: #f59e0b;
}

.review-inline textarea {
    display: block;
    width: 100%;
    padding: .55rem .75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: .85rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    resize: vertical;
    min-height: 70px;
    outline: none;
    transition: border-color .15s;
    margin-bottom: .65rem;
}
.review-inline textarea:focus { border-color: #6366f1; }

.btn-submit-review {
    padding: .45rem 1.1rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: .83rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}
.btn-submit-review:hover { background: #4338ca; }

/* ── Notifications list ──────────────────────────────────────── */
.notif-list { list-style: none; padding: 0; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.notif-item:last-child { border-bottom: none; }
.notif-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
    margin-top: .35rem;
}
.notif-dot.read { background: #e5e7eb; }
.notif-body { flex: 1; }
.notif-title { font-size: .875rem; font-weight: 700; color: #1a1a2e; margin-bottom: .15rem; }
.notif-msg   { font-size: .83rem; color: #6b7280; line-height: 1.45; }
.notif-time  { font-size: .73rem; color: #9ca3af; margin-top: .25rem; }
.notif-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.btn-mark-read {
    font-size: .75rem;
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.btn-mark-read:hover { text-decoration: underline; }

/* ── Buttons (generic) ───────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    padding: .5rem 1.1rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn-primary:hover { background: #4338ca; text-decoration: none; }

.btn-ghost {
    display: inline-block;
    padding: .5rem 1.1rem;
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: .85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn-ghost:hover { background: #e5e7eb; text-decoration: none; }

/* ── Responsive ──────────────────────────────────────────────── */
@media(max-width: 600px) {
    .page-wrap { padding: 0 1rem; margin: 1.25rem auto; }
    .filter-bar { padding: .75rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .booking-box { position: static; }
    table.bookings th, table.bookings td { padding: .55rem .6rem; font-size: .8rem; }
}
