/*
 * Mariana Tek Integration — Public Styles
 */

/* ── Critical: honour the HTML `hidden` attribute ────────────────────────── */
[class^="mt-"][hidden],
[class*=" mt-"][hidden],
.mt-flow__step[hidden],
.mt-loading[hidden],
.mt-error-message[hidden],
.mt-class-detail__loading[hidden],
.mt-class-detail__content[hidden] {
    display: none !important;
}

/* Both steps always visible in packages flow */
.mt-flow--packages .mt-flow__step {
    display: block !important;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
.mt-flow *,
.mt-location-finder *,
.mt-buy-page *,
.mt-schedule *,
.mt-class-detail * {
    box-sizing: border-box;
}

/* ── Utility ──────────────────────────────────────────────────────────────── */

.mt-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    color: var(--grey-color);
    font-size: 0.9rem;
}

.mt-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mt-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes mt-spin {
    to {
        transform: rotate(360deg);
    }
}

.mt-error-message {
    padding: 0.75rem 1rem;
    border-left: 3px solid #c0392b;
    background: #fef2f2;
    color: #c0392b;
    border-radius: 0 4px 4px 0;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.mt-empty-state {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.mt-flow--schedule {
    overflow: hidden;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.mt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
    line-height: 1;
}

.mt-btn--primary {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.mt-btn--primary:hover {
    opacity: 0.85;
    color: #fff;
}

.mt-btn--secondary {
    background: transparent;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.mt-btn--secondary:hover {
    background: #f5f5f5;
}

.mt-btn--teal {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

.mt-btn--teal:hover {
    background: #4aa9a3;
    color: #fff;
}

/* ── Flow layout ──────────────────────────────────────────────────────────── */

.mt-flow--packages {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* ── Studio selector white card ───────────────────────────────────────────── */

.mt-studio-card {
    overflow: hidden;
    max-width: 872px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Search + state filter row ────────────────────────────────────────────── */

.mt-studio-selector__state-wrap {
    position: relative;
    flex-shrink: 0;
}

.mt-studio-selector__filters {
    padding-bottom: 40px;
}

.mt-studio-selector__state {
    appearance: none;
    -webkit-appearance: none;
    background: var(--grey-surface-color);
    border: none;
    border-radius: 50px;
    padding: 8px 32px 8px 24px;
    height: 100%;
    font-size: 16px;
    height: 48px;
    font-family: inherit;
    color: var(--charcoal-color);
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 162px;
}

.mt-studio-selector__state-chevron {
    position: absolute;
    right: 20px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--charcoal-color);
    margin-top: -2px;
}

/* ── Studio list — grey container ─────────────────────────────────────────── */

.mt-location-finder__group {
    margin-bottom: 40px;
}

.mt-location-finder__group:last-child {
    margin-bottom: 0;
}

/* ── State group heading ──────────────────────────────────────────────────── */

.mt-studio-state {
    font-weight: normal;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    margin-bottom: 24px;
}

.mt-studio-state:hover {
    color: var(--brand-color);
}

.mt-state-group .mt-studio-state::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 1px solid var(--charcoal-color);
    border-bottom: 1px solid var(--charcoal-color);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.mt-state-group.mt-state-open .mt-studio-state::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* ── Studio row — white card ──────────────────────────────────────────────── */

.mt-studio-row,
.mt-location-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: #fff;
    border-radius: 24px;
    cursor: pointer;
    position: relative;
}

.mt-studio-row__body,
.mt-location-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.mt-studio-row__name,
.mt-location-card__name {
    font-weight: 400;
}

.mt-studio-row__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mt-location-card .mt-btn,
.mt-studio-row__chevron {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    fill: #6C7277;
    border: none;
    background: transparent;
    transition: transform 0.2s ease, fill 0.15s;
}

.mt-location-card:hover .mt-btn,
.mt-studio-row:hover .mt-studio-row__chevron {
    transform: translateX(6px);
    fill: var(--brand-color);
}

.mt-location-card__address,
.mt-studio-row__address {
    font-size: 14px;
    color: #6C7277;
}

/* ── Show all states ──────────────────────────────────────────────────────── */

.mt-show-all-states {
    display: block;
    background: none;
    border: none;
    color: var(--grey-color);
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 0;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mt-show-all-states:hover {
    color: var(--brand-color);
}
/* ── Tab filters ──────────────────────────────────────────────────────────── */

.mt-packages-tabs {
    display: flex;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mt-packages-tab {
    text-transform: uppercase;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .1em;
    font-weight: bold;
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    border-radius: 50px;
    transition: color 0.15s, border-color 0.15s;
}

.mt-packages-tab.active {
    color: #fff;
    background: var(--charcoal-color);
}

/* ── Package section ──────────────────────────────────────────────────────── */
.mt-buy-page__sections {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
}

.mt-package-section {
    width: 100%;
}

.mt-package-section__title {
    font-weight: normal;
}

.mt-package-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mt-package-section.mt-tab-hidden {
    display: none !important;
}

/* ── Package card ─────────────────────────────────────────────────────────── */
.mt-class-card,
.mt-package-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
}

.mt-package-card {
    flex-direction: column;
}

.mt-package-card__body {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    flex: 1;
}

.mt-package-card__category {
    font-size: 14px;
    font-weight: normal;
    color: #6C7277;
    margin-bottom: 6px;
}

.mt-package-card__summary,
.mt-package-detail__summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.mt-package-card__name {
    font-weight: 600;
    color: #000;
    margin: 0 0 16px;
}

.mt-package-card__description {
    font-size: 14px;
    color: #6C7277;
}

.mt-package-detail__description {
    font-size: 16px;
    color: #000;
}

.mt-package-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.mt-package-card__footer .btn {
    width: 100%;
}

.mt-package-card__price.title-s,
.mt-package-detail__price {
    font-weight: normal;
    margin-bottom: 0;
    color: #000;
}

.mt-package-card__select {
    background: var(--brand-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}

.mt-package-card__select:hover {
    background: #4aa9a3;
}

.search-form.mt-location-finder__search {
    margin-bottom: 40px;
}

.mt-state-studios {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Package detail modal ─────────────────────────────────────────────────── */

.mt-package-detail__name {
    font-weight: 600;
    margin-bottom: 16px;
}

.mt-package-detail__description:last-child {
    margin-bottom: 0;
}

.mt-package-detail__meta {
    font-size: 14px;
    color: var(--grey-color);
}

.mt-package-detail__cta-prompt {
    font-size: 14px;
    color: var(--grey-color);
    margin-bottom: 0;
}

/* ── Schedule ─────────────────────────────────────────────────────────────── */

.mt-schedule__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.mt-schedule__location-name {
    font-weight: normal;
    margin: 0;
}

.mt-schedule__date-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.mt-schedule__date-range {
    min-width: 160px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.mt-schedule__filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.mt-filter-group {
    display: flex;
    flex-direction: column;
}

.mt-schedule__filters-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.mt-schedule__day {
    margin-bottom: 40px;
}

.mt-schedule__day:last-child {
    margin-bottom: 0;
}

.mt-schedule__day-heading {
    font-size: 16px;
    font-weight: 600;
    padding: 0 24px;
    margin-bottom: 16px;
}

.mt-schedule__day-classes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Class Card ───────────────────────────────────────────────────────────── */

.mt-class-card {
    flex-wrap: wrap;
}

.mt-class-card__time {
    min-width: 80px;
    margin-bottom: 4px;
}

.mt-class-card__time,
.mt-class-card__name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.mt-class-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.mt-class-card__instructor,
.mt-class-card__duration {
    font-size: 14px;
    color: var(--grey-color);
    margin: 0;
}

.mt-class-card__footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-wrap: wrap;
    margin: auto;
}

.mt-class-card__spots {
    font-size: 14px;
    font-weight: 600;
}

.mt-class-card__spots--available {
    color: #27ae60;
}

.mt-class-card__spots--limited {
    color: #e67e22;
}

.mt-class-card__spots--full {
    color: #c0392b;
}

/* ── Class Detail ─────────────────────────────────────────────────────────── */

.mt-class-detail__header {
    margin-bottom: 1.25rem;
}

.mt-class-detail__cta-prompt {
    font-size: 16px;
    color: #6C7277;
}

.mt-class-detail__name {
    padding-right: 40px;
}

.mt-class-detail__datetime {
    display: flex;
    gap: 0.5rem;
    font-size: 18px;
}

.mt-class-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 40px;
    color: #000;
    margin-bottom: 24px;
}

.mt-class-detail__meta>div {
    display: flex;
    flex-direction: column;
}

.mt-class-detail__meta-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.mt-class-detail__spots--full {
    color: #c0392b;
}

.mt-class-detail__description {
    color: var(--grey-color);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.mt-class-detail__instructor-name {
    font-size: 16px;
}

/* ── Gift card fields in package modal ── */
.mt-gc-note {
    font-size: 16px;
    color: #000;
    margin-bottom: 16px;
}

.mt-gc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.mt-gc-field {
    width: 100%;
}

.mt-gc-field--col {
    width: calc(50% - 8px);
}

textarea.mt-gc-input {
    resize: vertical;
}

.mt-gc-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c0392b;
    font-size: 0.8rem;
}

.mt-class-card--past {
    opacity: 0.5;
    pointer-events: none;
}
.mt-proximity-notice {
    padding: 12px 16px;
    color: #6c7277;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .mt-schedule__filters {
        background-color: #fff;
        padding: 24px;
        gap: 24px;
        border-radius: 24px;
    }

    .mt-schedule__filters-wrap {
        display: grid;
        gap: 16px;
        grid-template-columns: repeat(3, 1fr);
    }

    .mt-packages-tab {
        padding-left: 40px;
        padding-right: 40px;
    }

    .mt-class-detail__meta-label {
        font-size: 18px;
    }
}

@media (max-width: 1023px) {
    .mt-class-card,
    .mt-location-card,
    .mt-studio-row {
        gap: 16px;
        padding: 16px;
        border-radius: 16px;
    }

    .mt-class-card__time, 
    .mt-class-card__name {
        font-size: 16px;
    }

    .mt-schedule__day-heading {
        padding: 0 16px;
    }

    .mt-buy-page__sections {
        padding: 24px;
        gap: 24px;
        margin-bottom: 24px;
        border-radius: 24px;
    }

    .mt-packages-tabs {
        margin-left: -24px;
        margin-right: -24px;
        padding: 0 24px;
    }

    .mt-package-detail__price {
        font-size: 24px;
    }

    .mt-studio-state {
        margin-bottom: 16px;
    }

    .mt-studio-selector__state,
    .mt-studio-selector__search-wrap {
        background: #fff;
    }

    .mt-studio-selector__state-wrap,
    .mt-studio-selector__state {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .mt-class-card {
        flex-direction: column;
        gap: 24px;
    }

    .mt-class-card__footer {
        margin: 0;
    }

    .mt-class-card__footer {
        width: 100%;
    }

    .mt-schedule__header {
        flex-direction: column;
        align-items: stretch;
    }

    .mt-schedule__date-range {
        width: 100%;
    }

    .mt-schedule__prev-week,
    .mt-schedule__next-week {
        flex-shrink: 0;
    }
    
    .mt-class-detail__meta {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .mt-package-section__grid {
        grid-template-columns: 1fr;
    }

    .mt-gc-field--col {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .mt-package-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 812px) and (max-height: 414px) and (orientation: landscape) {
    .mt-packages-tabs {
        margin-left: -50px;
        margin-right: -50px;
        padding: 0 50px;
    }
}