/**
 * qq Booking Tea · 前端样式
 * 配色变量继承子比主题 --zib-primary-color，卡片风格对齐子比 zib-widget
 */

.qqtea-box {
    background: var(--main-bg-color, #fff);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, .04);
    color: var(--main-color, #333);
}

/* ========== 包厢列表 ========== */
.qqtea-room-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.qqtea-room-card {
    background: var(--main-bg-color, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 0, 0, .05);
    transition: transform .2s, box-shadow .2s;
}

.qqtea-room-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}

.qqtea-room-cover {
    display: block;
    position: relative;
    height: 150px;
    background: #f3f4f6;
}

.qqtea-room-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qqtea-room-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    opacity: .5;
}

.qqtea-room-cate {
    position: absolute;
    left: 10px;
    top: 10px;
    background: var(--zib-primary-color, #3b82f6);
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 20px;
}

.qqtea-room-body {
    padding: 12px 14px 14px;
}

.qqtea-room-name {
    margin: 0 0 6px;
    font-size: 16px;
}

.qqtea-room-name a {
    color: var(--main-color, #333);
    text-decoration: none;
}

.qqtea-room-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 10px;
}

.qqtea-room-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qqtea-room-price {
    color: #f43f5e;
    font-size: 18px;
    font-weight: 700;
}

.qqtea-room-price i {
    font-style: normal;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

/* ========== 按钮 ========== */
.qqtea-btn {
    display: inline-block;
    background: var(--zib-primary-color, #3b82f6);
    color: #fff !important;
    border: 0;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
}

.qqtea-btn:hover {
    opacity: .85;
}

.qqtea-btn-big {
    font-size: 16px;
    padding: 10px 28px;
    border-radius: 24px;
}

.qqtea-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.qqtea-btn-plain {
    background: #fff;
    color: var(--main-color, #333) !important;
    border: 1px solid #d1d5db;
}

.qqtea-btn-pay {
    background: #f43f5e;
}

/* ========== 预约页 ========== */
.qqtea-booking-head {
    text-align: center;
    margin-bottom: 16px;
}

.qqtea-booking-title {
    margin: 0 0 6px;
    font-size: 22px;
}

.qqtea-booking-sub {
    color: #9ca3af;
    font-size: 13px;
}

.qqtea-price-text {
    color: #f43f5e;
}

.qqtea-sec {
    margin: 18px 0;
}

.qqtea-sec-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.qqtea-sec-tip {
    font-weight: 400;
    font-size: 12px;
    color: #9ca3af;
    margin-left: 8px;
}

/* 日期条 */
.qqtea-date-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.qqtea-date-item {
    flex: 0 0 auto;
    min-width: 64px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    transition: all .15s;
    background: var(--main-bg-color, #fff);
}

.qqtea-date-item b {
    display: block;
    font-size: 13px;
}

.qqtea-date-item span {
    font-size: 12px;
    color: #9ca3af;
}

.qqtea-date-item.holiday span::after {
    content: '休';
    color: #f43f5e;
    font-size: 11px;
    margin-left: 2px;
}

.qqtea-date-item.active {
    border-color: var(--zib-primary-color, #3b82f6);
    background: var(--zib-primary-color, #3b82f6);
}

.qqtea-date-item.active b,
.qqtea-date-item.active span {
    color: #fff;
}

/* 时段格子 */
.qqtea-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
}

.qqtea-slot {
    text-align: center;
    padding: 9px 2px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    cursor: pointer;
    background: #e2f0e5;
    border-color: #16a34a;
    user-select: none;
    transition: all .1s;
}

.qqtea-slot:hover:not(.disabled) {
    border-color: var(--zib-primary-color, #3b82f6);
}

.qqtea-slot.disabled {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: line-through;
}

.qqtea-slot.sel-start {
    background: var(--zib-primary-color, #3b82f6);
    border-color: var(--zib-primary-color, #3b82f6);
    color: #fff;
    font-weight: 700;
}

.qqtea-slot.sel-between {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.qqtea-slot.sel-end {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 700;
}

.qqtea-select-info {
    margin-top: 10px;
    font-size: 14px;
}

.qqtea-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    padding: 24px 0;
}

.qqtea-loading.err {
    color: #dc2626;
}

/* 表单 */
.qqtea-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.qqtea-form-item label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.qqtea-form-item input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    background: var(--main-bg-color, #fff);
    color: var(--main-color, #333);
}

.qqtea-form-full {
    grid-column: 1 / -1;
}

/* 价格条 */
.qqtea-price-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 14px;
}

.qqtea-price-detail {
    font-size: 15px;
}

.qqtea-price-detail .description {
    font-size: 12px;
    color: #9ca3af;
}

.qqtea-msg {
    min-height: 22px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.qqtea-msg.ok {
    color: #16a34a;
}

.qqtea-msg.err {
    color: #dc2626;
}

/* ========== 我的预约 ========== */
.qqtea-my-title {
    margin: 0 0 14px;
    font-size: 20px;
}

.qqtea-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px 0;
}

.qqtea-order-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.qqtea-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.qqtea-order-room {
    font-weight: 700;
    font-size: 15px;
}

.qqtea-badge {
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 20px;
}

.qqtea-order-row {
    font-size: 14px;
    margin: 4px 0;
}

.qqtea-order-row.description {
    font-size: 12px;
    color: #9ca3af;
}

.qqtea-verify-box {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.qqtea-verify-box b.qqtea-code {
    font-size: 20px;
    letter-spacing: 4px;
    color: #b45309;
}

.qqtea-order-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 8px;
}

.qqtea-cancel-tip {
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
}

/* ========== 支付方式选择弹窗 ========== */
.qqtea-pay-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: qqteaFade .15s ease;
}

@keyframes qqteaFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qqtea-pay-box {
    background: var(--main-bg-color, #fff);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 420px;
    padding: 18px 18px 22px;
    animation: qqteaUp .2s ease;
}

@media (min-width: 640px) {
    .qqtea-pay-mask {
        align-items: center;
    }

    .qqtea-pay-box {
        border-radius: 14px;
    }
}

@keyframes qqteaUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.qqtea-pay-head {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.qqtea-pay-head b {
    font-size: 16px;
}

.qqtea-pay-amount {
    margin-left: 10px;
    color: #f43f5e;
    font-weight: 700;
}

.qqtea-pay-close {
    margin-left: auto;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 6px;
}

.qqtea-pay-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.qqtea-pay-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color .15s;
}

.qqtea-pay-item:hover {
    border-color: var(--zib-primary-color, #3b82f6);
}

.qqtea-pay-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qqtea-pay-icon img {
    max-width: 28px;
    max-height: 28px;
}

.qqtea-pay-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.qqtea-pay-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    box-sizing: border-box;
    transition: all .15s;
}

.qqtea-pay-radio.on {
    border: 5px solid var(--zib-primary-color, #3b82f6);
}

/* ========== 出示二维码弹层 ========== */
.qqtea-qr-box {
    text-align: center;
    padding-top: 22px;
}

.qqtea-qr-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.qqtea-qr-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 214px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
}

.qqtea-qr-img img,
.qqtea-qr-img canvas {
    display: block;
}

.qqtea-qr-code {
    margin-top: 12px;
    font-size: 14px;
}

.qqtea-qr-code b {
    font-size: 20px;
    letter-spacing: 4px;
    color: #b45309;
}

/* ========== 支付成功卡片 ========== */
.qqtea-success-box {
    text-align: center;
    padding-top: 28px;
}

.qqtea-success-icon {
    font-size: 44px;
    line-height: 1;
}

.qqtea-success-title {
    font-size: 17px;
    font-weight: 700;
    margin: 10px 0 6px;
}

.qqtea-success-info {
    font-size: 14px;
    margin-bottom: 6px;
}

.qqtea-success-info .description {
    font-size: 12px;
    color: #9ca3af;
}

.qqtea-success-code-wrap {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.qqtea-success-code-wrap span {
    font-size: 12px;
    color: #92400e;
}

.qqtea-success-code-wrap b.qqtea-code {
    font-size: 26px;
    letter-spacing: 6px;
    color: #b45309;
}

.qqtea-success-code-wrap i {
    font-style: normal;
    font-size: 12px;
    color: #9ca3af;
}

.qqtea-success-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.qqtea-success-btns .qqtea-btn {
    flex: 1;
    max-width: 160px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 640px) {
    .qqtea-form {
        grid-template-columns: 1fr;
    }

    .qqtea-price-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .qqtea-slots {
        grid-template-columns: repeat(4, 1fr);
    }
}
