/* Yogarazuma Cabinet — clean CSS, no framework */

[x-cloak] { display: none !important; }

/* ── Cabinet wrapper ────────────────────────────────────────────────────── */
.yr-cabinet {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
    color: inherit;
    line-height: 1.5;
}

/* ── Navigation tabs ────────────────────────────────────────────────────── */
.yr-cabinet-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.yr-cabinet-nav::-webkit-scrollbar { display: none; }

.yr-cabinet-nav button {
    padding: 10px 16px;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.yr-cabinet-nav button:hover { color: #222; }
.yr-cabinet-nav button.yr-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 700;
}

/* ── Loading ────────────────────────────────────────────────────────────── */
.yr-cabinet-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 0.95rem;
}

/* ── Section titles ─────────────────────────────────────────────────────── */
.yr-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #333;
}

.yr-section-history { margin-top: 24px; }

/* ── Booking cards ──────────────────────────────────────────────────────── */
.yr-booking-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
}

.yr-booking-card.yr-history { background: #fafafa; }

.yr-booking-service { font-weight: 600; font-size: 1rem; }
.yr-booking-time    { font-size: 0.9rem; color: #444; }
.yr-booking-status  { font-size: 0.8rem; color: #666; }
.yr-booking-amount  { font-size: 0.85rem; font-weight: 600; color: #2563eb; }

.yr-booking-actions { margin-top: 8px; }

.yr-cancel-btn {
    padding: 6px 14px;
    background: none;
    border: 1px solid #dc2626;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.yr-cancel-btn:hover { background: #dc2626; color: #fff; }

.yr-rebook {
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
    margin-top: 4px;
}

.yr-rebook:hover { text-decoration: underline; }

/* ── Subscription cards ─────────────────────────────────────────────────── */
.yr-sub-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
}

.yr-sub-name     { font-weight: 700; font-size: 1rem; }
.yr-sub-sessions { font-size: 0.9rem; color: #444; }
.yr-sub-dates    { font-size: 0.85rem; color: #666; }
.yr-sub-status   { font-size: 0.8rem; color: #888; text-transform: uppercase; }
.yr-pause-info   { font-size: 0.85rem; color: #92400e; background: #fef3c7; padding: 4px 8px; border-radius: 4px; }

.yr-sub-card.yr-sub-active   { border-left: 4px solid #22c55e; }
.yr-sub-card.yr-sub-paused   { border-left: 4px solid #f59e0b; }
.yr-sub-card.yr-sub-exhausted,
.yr-sub-card.yr-sub-expired  { border-left: 4px solid #e5e7eb; opacity: 0.7; }

.yr-pause-btn {
    align-self: flex-start;
    padding: 6px 14px;
    background: none;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 4px;
    transition: background 0.15s;
}

.yr-pause-btn:hover { background: #fef3c7; }

/* ── Promo cards ────────────────────────────────────────────────────────── */
.yr-promos-list { display: flex; flex-direction: column; gap: 10px; }

.yr-promo-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.yr-promo-card.yr-credit { border-left: 4px solid #3b82f6; }

.yr-promo-code     { font-family: monospace; font-size: 1rem; font-weight: 700; letter-spacing: 1px; }
.yr-promo-discount { font-size: 1.1rem; color: #16a34a; font-weight: 700; }
.yr-promo-until    { font-size: 0.8rem; color: #888; }
.yr-promo-badge {
    align-self: flex-start;
    padding: 2px 8px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Referral ───────────────────────────────────────────────────────────── */
.yr-referral {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8faff;
}

.yr-referral-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
}

.yr-ref-link {
    display: flex;
    gap: 8px;
    align-items: center;
}

.yr-ref-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    min-width: 0;
}

.yr-copy-btn {
    padding: 8px 14px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

.yr-copy-btn:hover { background: #1d4ed8; }

.yr-ref-stats { font-size: 0.85rem; color: #555; margin-top: 8px; }

/* ── Profile form ───────────────────────────────────────────────────────── */
.yr-profile-form { display: flex; flex-direction: column; gap: 14px; }

.yr-field { display: flex; flex-direction: column; gap: 4px; }

.yr-field label,
.yr-field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

.yr-field input[type="tel"],
.yr-field textarea {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.yr-field input:focus,
.yr-field textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.yr-radio-group { display: flex; flex-wrap: wrap; gap: 12px; }
.yr-radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.9rem; }

.yr-notif-title {
    margin: 8px 0 4px;
    font-size: 0.95rem;
    font-weight: 700;
}

.yr-notif-options { display: flex; flex-direction: column; gap: 8px; }

.yr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.yr-save-btn {
    align-self: flex-start;
    margin-top: 8px;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.yr-save-btn:hover    { background: #1d4ed8; }
.yr-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.yr-save-ok {
    margin-top: 8px;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Progress ───────────────────────────────────────────────────────────── */
.yr-progress {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yr-progress-item { font-size: 0.9rem; color: #444; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.yr-empty {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* ── Error toast ────────────────────────────────────────────────────────── */
.yr-error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc2626;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    max-width: 380px;
    width: calc(100% - 40px);
    text-align: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .yr-cabinet { padding: 0 4px; }
    .yr-cabinet-nav button { padding: 8px 12px; font-size: 0.85rem; }
    .yr-booking-card,
    .yr-sub-card,
    .yr-promo-card { padding: 12px; }
    .yr-ref-link { flex-direction: column; align-items: stretch; }
    .yr-copy-btn { width: 100%; text-align: center; }
}
