/**
 * CafeHop public site — reusable UI components.
 */

/* Buttons */
.btn-primary {
    background-color: var(--ch-secondary) !important;
    border-color: var(--ch-secondary) !important;
    color: #fff !important;
    border-radius: var(--ch-radius-pill);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary,
.btn-primary.active,
.btn-primary.show,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--ch-secondary-hover) !important;
    border-color: var(--ch-secondary-hover) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--ch-secondary) !important;
    border-color: var(--ch-secondary) !important;
    border-radius: var(--ch-radius-pill);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--ch-secondary-hover) !important;
    border-color: var(--ch-secondary-hover) !important;
    color: #fff !important;
}

.text-primary { color: var(--ch-secondary) !important; }
.border-primary { border-color: var(--ch-secondary) !important; }
.bg-primary { background-color: var(--ch-secondary) !important; color: #fff !important; }
.badge.bg-primary { color: #fff !important; }

/* Currency */
.currency-number {
    color: var(--ch-secondary) !important;
    font-weight: bold !important;
}

.currency-aed {
    color: #000 !important;
    font-weight: normal !important;
}

[data-bs-theme="dark"] .currency-aed {
    color: #e9ecef !important;
}

/* Cards */
.ch-card {
    background: var(--ch-surface);
    border: 1px solid rgba(44, 24, 16, 0.08);
    border-radius: var(--ch-radius-lg);
    box-shadow: var(--ch-shadow-sm);
    padding: 1.5rem;
}

.ch-card--form {
    padding: 2rem;
}

.ch-card,
.card-hover,
.ch-card--hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ch-card--hover:hover,
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--ch-shadow-hover);
}

[data-bs-theme="dark"] .ch-card {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .card-hover:hover,
[data-bs-theme="dark"] .ch-card--hover:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.08);
}

/* Avatars & images */
.ch-avatar {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: 50%;
}

.ch-card-img {
    width: 100%;
    object-fit: cover;
    border-radius: var(--ch-radius) var(--ch-radius) 0 0;
}

/* Forms */
.ch-form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.ch-form .form-control:focus {
    border-color: var(--ch-secondary);
    box-shadow: 0 0 0 0.2rem rgba(228, 114, 37, 0.15);
}

/* Toasts */
.ch-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

[dir="rtl"] .ch-toast-stack {
    right: auto;
    left: 1rem;
}

.ch-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: var(--ch-radius);
    background: var(--ch-surface);
    border: 1px solid rgba(44, 24, 16, 0.1);
    box-shadow: var(--ch-shadow-md);
    animation: ch-toast-in 0.25s ease;
}

.ch-toast--success { border-left: 4px solid #198754; }
.ch-toast--error { border-left: 4px solid #dc3545; }
.ch-toast--warning { border-left: 4px solid #ffc107; }
.ch-toast--info { border-left: 4px solid var(--ch-secondary); }

.ch-toast__icon {
    font-size: 1.1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.ch-toast--success .ch-toast__icon { color: #198754; }
.ch-toast--error .ch-toast__icon { color: #dc3545; }
.ch-toast--warning .ch-toast__icon { color: #b8860b; }
.ch-toast--info .ch-toast__icon { color: var(--ch-secondary); }

.ch-toast__message {
    flex: 1;
    font-size: 0.925rem;
    line-height: 1.45;
}

.ch-toast.ch-toast--out {
    animation: ch-toast-out 0.2s ease forwards;
}

@keyframes ch-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ch-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* Benefit list (partners, about) */
.ch-benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ch-benefit-list li {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.ch-benefit-list .bi {
    color: var(--ch-secondary);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* ─── ClassPass-style page patterns ─── */

.ch-page-head {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.ch-page-head__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.ch-page-head__lead {
    font-size: 1.125rem;
    color: var(--body-color);
    opacity: 0.75;
    margin-bottom: 0;
    line-height: 1.6;
}

.ch-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ch-dark);
    margin: 0 0 1rem;
    line-height: 1.3;
}

.ch-section-title-row {
    margin-bottom: 1rem;
}

.ch-section-title-row .ch-section-title {
    margin-bottom: 0;
}

/* Hero — ClassPass: big type on white */
.ch-hero--cp {
    background: #fff;
    color: var(--ch-dark);
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

.ch-hero--cp .ch-hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--ch-dark);
}

.ch-hero--cp .ch-hero__accent {
    color: var(--ch-secondary);
}

.ch-hero--cp .ch-hero__sub {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    max-width: 36rem;
    margin: 0 auto 2rem;
    opacity: 0.8;
    line-height: 1.5;
}

.ch-hero--cp .ch-hero__actions {
    justify-content: center;
}

.ch-hero--cp .ch-hero__note {
    font-size: 0.8rem;
    opacity: 0.55;
    margin-top: 1.25rem;
}

.ch-hero--cp .btn-link {
    color: var(--ch-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ch-hero--cp .btn-link:hover {
    color: var(--ch-secondary);
}

/* Informative split section */
.ch-informative {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 992px) {
    .ch-informative {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.ch-informative__media {
    border-radius: var(--ch-radius-lg);
    overflow: hidden;
    background: var(--ch-light);
    aspect-ratio: 4 / 3;
}

.ch-informative__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ch-informative__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.ch-informative__body {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.85;
}

/* How-to steps */
.ch-steps {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .ch-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ch-step {
    text-align: center;
}

.ch-step__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ch-light);
}

.ch-step__icon img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.ch-step__num {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ch-secondary);
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
}

.ch-step__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ch-step__text {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.55;
    margin: 0;
}

/* CTA band */
.ch-cta-band {
    background: var(--ch-secondary);
    color: #fff;
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.ch-cta-band__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #fff;
}

.ch-cta-band__text {
    opacity: 0.92;
    margin-bottom: 1.5rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.ch-cta-band .btn-light {
    border-radius: var(--ch-radius-pill);
    font-weight: 600;
    padding: 0.65rem 1.75rem;
}

/* Content page (about, legal) */
.ch-content-page {
    max-width: 44rem;
    margin: 0 auto;
}

.ch-prose {
    font-size: 1.05rem;
    line-height: 1.75;
}

.ch-prose h2,
.ch-prose h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* Plan cards */
.ch-plan-card {
    border: 1px solid rgba(44, 24, 16, 0.1);
    border-radius: var(--ch-radius-lg);
    padding: 2rem 1.5rem;
    height: 100%;
    text-align: center;
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ch-plan-card:hover {
    box-shadow: var(--ch-shadow-md);
    transform: translateY(-2px);
}

.ch-plan-card--current {
    border-color: #198754;
    border-width: 2px;
}

.ch-plan-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ch-dark);
    margin: 0.5rem 0;
}

.ch-plan-card__features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    text-align: left;
}

.ch-plan-card__features li {
    padding: 0.35rem 0;
    font-size: 0.925rem;
}

.ch-plan-card__features .bi {
    color: var(--ch-secondary);
    margin-right: 0.35rem;
}

/* Cafe cards */
.ch-cafe-card {
    border: 1px solid rgba(44, 24, 16, 0.08);
    border-radius: var(--ch-radius-lg);
    overflow: hidden;
    background: #fff;
    height: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}

.ch-cafe-card:hover {
    box-shadow: var(--ch-shadow-hover);
    transform: translateY(-3px);
    color: inherit;
}

.ch-cafe-card__img-wrap {
    position: relative;
    height: 12.5rem;
    background: var(--ch-light);
}

.ch-cafe-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ch-cafe-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-accent) 100%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 3rem;
}

.ch-cafe-card__img-placeholder--brand {
    background: var(--ch-light);
}

.ch-cafe-card__img-placeholder-logo {
    max-width: 42%;
    max-height: 62%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ch-cafe-card__badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
}

.ch-cafe-card__body {
    padding: 1.15rem;
}

.ch-cafe-card__title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.ch-cafe-card__logo {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border-radius: var(--ch-radius);
    background: var(--ch-light);
    flex-shrink: 0;
}

/* Filter sidebar */
.ch-filter-panel {
    border: 1px solid rgba(44, 24, 16, 0.08);
    border-radius: var(--ch-radius-lg);
    background: #fff;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ch-filter-panel__head {
    padding: 0.85rem 1.15rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    background: var(--ch-surface-muted);
}

.ch-filter-panel__body {
    padding: 1.15rem;
}

/* Accordion — cleaner */
.ch-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid rgba(44, 24, 16, 0.1);
    background: transparent;
}

.ch-accordion .accordion-button {
    font-weight: 600;
    font-size: 1rem;
    padding: 1.15rem 0;
    background: transparent;
    box-shadow: none;
}

.ch-accordion .accordion-button:not(.collapsed) {
    color: var(--ch-secondary);
    background: transparent;
}

.ch-accordion .accordion-body {
    padding: 0 0 1.15rem;
    opacity: 0.85;
    line-height: 1.65;
}

/* Contact info tiles */
.ch-info-tile {
    border: 1px solid rgba(44, 24, 16, 0.08);
    border-radius: var(--ch-radius-lg);
    padding: 1.5rem;
    height: 100%;
    background: #fff;
}

.ch-info-tile__icon {
    color: var(--ch-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Welcome banner (logged in) */
.ch-welcome-bar {
    background: var(--ch-light);
    border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    padding: 1rem 0;
}

/* Map */
.ch-map {
    height: 37.5rem;
    width: 100%;
    border-radius: var(--ch-radius-lg);
    overflow: hidden;
    box-shadow: var(--ch-shadow-sm);
}

.ch-map-wrap.is-hidden {
    display: none;
}

/* View toggle */
.ch-view-toggle .btn.active {
    background-color: var(--ch-secondary) !important;
    border-color: var(--ch-secondary) !important;
    color: #fff !important;
}

/* Cafe detail */
.ch-cafe-hero-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--ch-branch-header-aspect);
    max-height: calc(var(--ch-branch-header-height) * 1px);
    object-fit: cover;
    object-position: center;
    border-radius: var(--ch-radius-lg);
    background: var(--ch-light);
}

.ch-cafe-hero-img--contain {
    object-fit: contain;
}

.ch-cafe-logo {
    max-width: 5rem;
    max-height: 5rem;
    object-fit: contain;
    border-radius: var(--ch-radius);
}

.ch-review-avatar {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    border-radius: 50%;
}

.ch-review-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6c757d;
    color: #fff;
    font-size: 0.85rem;
}

/* Empty state */
.ch-empty-icon {
    font-size: 4rem;
    color: #ccc;
}

/* Hidden utility */
.ch-is-hidden {
    display: none !important;
}

.listView.ch-is-hidden,
#listView.ch-is-hidden {
    display: none !important;
}

/* Spinner in search */
.ch-search-spinner.ch-is-hidden {
    display: none !important;
}
