/**
 * 礼品卡公开侧样式（名片页 Tab / redeem.php / verify-claim.php 共用）
 * 个人名片系统 v3.1
 *
 * 风格与 card.css 名片体系一致：圆角卡片、柔和阴影、主色 #3b82f6
 */

/* ================= 名片页：礼品卡 Tab ================= */

.gift-zone {
    padding: 18px 0 24px;
}

.gift-zone__lead {
    margin: 16px 0 0;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.gift-saved-claim {
    display: none;
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    text-align: center;
}

.gift-saved-claim.is-visible {
    display: block;
}

.gift-saved-claim__title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.gift-saved-claim__text {
    margin: 0 0 8px;
    font-size: 13px;
    color: #14532d;
}

.gift-saved-claim__btn {
    appearance: none;
    border: none;
    background: #16a34a;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.gift-zone__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.gift-zone__card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(43, 60, 102, 0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.gift-zone__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(43, 60, 102, 0.12);
}

.gift-zone__card-cover {
    aspect-ratio: 4 / 3;
    background: #f7fafc;
}

.gift-zone__card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gift-zone__card-body {
    padding: 12px 14px;
}

.gift-zone__card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.gift-zone__card-desc {
    margin: 4px 0 0;
    font-size: 12px;
    color: #718096;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 兑换输入区 ---- */
.gift-delivery-choice {
    display: none;
    gap: 16px;
    font-size: 14px;
    color: #1f2937;
}
.gift-delivery-choice.is-visible {
    display: flex;
}
.gift-redeem-extra {
    display: none;
    flex-direction: column;
    gap: 10px;
}
.gift-redeem-extra.is-visible {
    display: flex;
}
.gift-mail-fields {
    display: none;
    flex-direction: column;
    gap: 10px;
}
.gift-mail-fields.is-visible {
    display: flex;
}
.gift-redeem-box {
    max-width: 460px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(43, 60, 102, 0.06);
}

.gift-redeem-box__label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
}

.gift-redeem-box__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    min-height: 44px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.gift-redeem-box__input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.gift-redeem-box__prefill {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    text-align: center;
    line-height: 1.45;
}

.gift-redeem-box__halfs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gift-redeem-box__input--half {
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
    min-height: 40px;
}

.gift-redeem-box__btn {
    appearance: none;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    min-height: 44px;
    transition: opacity .15s ease, transform .1s ease;
}

.gift-redeem-box__btn:hover {
    opacity: .92;
}

.gift-redeem-box__btn:active {
    transform: scale(.98);
}

.gift-redeem-box__btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.gift-redeem-box__error {
    margin: 0;
    font-size: 13px;
    color: #e53e3e;
    text-align: center;
}

/* ================= 兑换结果弹窗 ================= */

.gc-claim-modal {
    max-width: 380px;
    text-align: center;
}

.gc-claim-modal__body {
    padding: 6px 22px 24px;
}

.gc-claim-modal__success-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #38a169;
    margin: 6px 0 12px;
}

.gc-claim-modal__title {
    margin: 0;
    font-size: 20px;
    color: #38a169;
}

.gc-claim-modal__gift {
    margin-bottom: 14px;
}

.gc-claim-modal__gift-img {
    margin: 0 auto 8px;
    max-width: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.gc-claim-modal__gift-img img {
    width: 100%;
    display: block;
}

.gc-claim-modal__gift-title {
    margin: 0 0 4px;
    font-size: 16px;
    color: #2d3748;
}

.gc-claim-modal__gift-desc {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

.gc-claim-modal__no-wrap {
    background: #f0fdf4;
    border: 1px solid #c6f6d5;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.gc-claim-modal__no-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gc-claim-modal__copy-btn {
    appearance: none;
    border: 1px solid #9ae6b4;
    background: #fff;
    color: #2f855a;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.gc-claim-modal__copy-btn:hover {
    background: #f0fdf4;
}

.gc-claim-modal__no-label {
    font-size: 12px;
    color: #48bb78;
    margin-bottom: 4px;
}

.gc-claim-modal__no {
    font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #276749;
    user-select: all;
}

.gc-claim-modal__qr {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

.gc-claim-modal__qr img,
.gc-claim-modal__qr canvas {
    display: block;
}

.gc-claim-modal__tip {
    font-size: 12px;
    color: #a0aec0;
    margin: 0 0 14px;
}

.gc-claim-modal__done-btn {
    appearance: none;
    border: none;
    background: #2d3748;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 10px;
    cursor: pointer;
    min-height: 44px;
}

/* ================= verify-claim.php 凭证落地页 ================= */

.gcv-page {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.gcv-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(43, 60, 102, 0.08);
}

.gcv-card__brand {
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 18px;
}

.gcv-card__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.gcv-card__status--pending { background: #feebc8; color: #9c6b1e; }
.gcv-card__status--fulfilled { background: #c6f6d5; color: #276749; }
.gcv-card__status--cancelled { background: #e2e8f0; color: #718096; }
.gcv-card__status--invalid { background: #fed7d7; color: #9b2c2c; }

.gcv-card__gift-title {
    margin: 0 0 4px;
    font-size: 18px;
    color: #2d3748;
}

.gcv-card__gift-sub {
    font-size: 13px;
    color: #718096;
    margin: 0 0 18px;
}

.gcv-card__no-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gcv-card__no {
    font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #2d3748;
    user-select: all;
    word-break: break-all;
}

.gcv-copy-btn {
    appearance: none;
    border: 1px solid #cbd5e0;
    background: #fff;
    color: #4a5568;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .15s ease, color .15s ease;
}

.gcv-copy-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.gcv-card__meta {
    font-size: 12px;
    color: #a0aec0;
    margin: 0 0 18px;
}

.gcv-card__qr {
    display: inline-block;
    background: #fff;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 18px;
}

.gcv-card__qr-tip {
    margin: 8px 0 0;
    font-size: 12px;
    color: #a0aec0;
}

.gcv-action-btn {
    display: inline-block;
    appearance: none;
    border: none;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    min-height: 44px;
    text-decoration: none;
}

.gcv-action-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.gcv-hint {
    font-size: 12px;
    color: #a0aec0;
    margin: 10px 0 0;
}

.gcv-owner-note {
    margin-top: 14px;
    font-size: 12px;
    color: #a0aec0;
}

/* ================= 响应式 ================= */

@media (max-width: 640px) {
    .gift-zone__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gift-redeem-box__halfs {
        grid-template-columns: 1fr;
    }

    .gc-claim-modal__no {
        font-size: 17px;
        letter-spacing: 1px;
    }
}