/* =================================
    STAMP CARD PC VERSION
    Scoped to sc-provider
    ================================= */

/* ===== CSS Variables ===== */
:root {
    /* Typography */
    --font-family-primary: 'Rakuten Sans JP', sans-serif;
    --font-family-secondary: 'Hiragino Sans', sans-serif;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-semi-bold: 600;
    --font-weight-bold: 700;

    /* Z-Index Scale */
    --z-index-overlay: 1000;

    /* Transitions */
    --transition-fast: 0.2s ease;

    /* Gift */
    --gift-theme-color: #EF255E;
}

/* ===== Web Components初期化  ===== */
sc-provider:not(:defined) {
    visibility: hidden;
}

/* ===== Stamp Card Box  ===== */
.stamp-card-box {
    background-color: #F7F1E2;
    padding: 34px 0px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/*===== Stamp Card Title Area ===== */
.stamp-card-title-area {
    text-align: center;
}

.stamp-card-title {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semi-bold);
    font-size: 20px;
    line-height: 130%;
    text-align: center;
    color: #333333;
    margin-bottom: 8px;
}

.stamp-card-bold-title {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    font-size: 32px;
    line-height: 150%;
    text-align: center;
    color: #333333;
}

.stamp-card-title-area img {
    margin-top: 12px;
}

/* ===== Stamp Card Section ===== */
.stamp-card-section {
    text-align: center;
}

.stamp-status-area {
    display: block;
    font-family: var(--font-family-primary);
    margin: 12px auto;
}

.stamp-card-user-title,
.stamp-count-label,
.stamp-count-value {
    line-height: 130%;
}

.stamp-card-user-title,
.stamp-count-label {
    color: #333333;
}

.stamp-card-user-title {
    font-weight: var(--font-weight-bold);
    font-size: 20px;
}

.stamp-count-label {
    font-weight: var(--font-weight-normal);
    font-size: 14px;
}

.stamp-count-value {
    font-weight: var(--font-weight-bold);
    font-size: 32px;
    color: #BF0000;
}

.stamp-card-container {
    display: block;
    position: relative;
    width: 480px;
    padding: 8px;
    margin: 0 auto;
}

.status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-overlay);
}

/* ギフトボタンのオーバーレイ適用 */
sc-provider:has(.status-gift-overlay:not([hidden])) .gift-confirm-button-container {
    position: relative;
    pointer-events: none;
}

sc-provider:has(.status-gift-overlay:not([hidden])) .gift-confirm-button-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: var(--z-index-overlay);
    pointer-events: none;
}

.status-message {
    display: grid;
    padding: 10px 24px;
    text-align: center;
    font-size: 16px;
    font-weight: var(--font-weight-normal);
    color: #ffffff;
    line-height: 1.3;
    gap: 12px;
}

.warning-icon {
    width: 40px;
    height: 40px;
    text-align: center;
    margin: 0 auto;
}

.button-step {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 47px;
    border: 0;
    border-radius: 4px;
    background-color: #bf0000;
    margin: 0 auto;
    text-decoration: none !important;
    color: #ffffff;
    font-family: var(--font-family-primary);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    line-height: 1.6;
    letter-spacing: -0.24px;
}

@media (hover: hover) and (pointer: fine) {
    .button-step:hover {
        color: #ffffff;
        text-decoration: none;
    }
}

#login-button:visited {
    color: #ffffff;
}

sc-anchor.button-step {
    display: inline-block;
    width: 280px;
    height: 47px;
    border: 0;
    border-radius: 4px;
    background-color: #bf0000;
    margin: 0 auto;
}

sc-anchor.button-step::part(link) {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-family-primary);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    line-height: 1.6;
    letter-spacing: -0.24px;
}

/* スタンプカードカスタム */
sc-stamp-card {
    --sc-stamp-card-stamp-count: 25;
    --sc-stamp-card-columns: 5;
    --sc-stamp-card-rows: 2;
    --sc-stamp-card-stamp-gap: 15px;
    --sc-stamp-card-background-image: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/card_base_pink.png');
    --sc-stamp-item-image-gift-locked: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/giftBox.png');
    --sc-stamp-item-image-acquired: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/stamp.png');
    --sc-stamp-item-image-gift-available: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/availableGift.png');
    --sc-stamp-item-image-gift-used: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/usedGift.png');
    --sc-stamp-item-image-gift-next: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/giftBox.png');
    --sc-stamp-item-number-font-family: var(--font-family-primary);
    --sc-stamp-item-number-font-weight: var(--font-weight-bold);
    --sc-stamp-item-number-font-size: 29.4px;
    --sc-stamp-item-number-color: #B3B3B3;
    --sc-stamp-card-nav-color: #333333;
    --sc-stamp-card-pagination-dot-color: #00000033;
    --sc-stamp-card-nav-prev-image: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/chevronLeft.png');
    --sc-stamp-card-nav-next-image: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/chevronRight.png');
    --sc-stamp-card-nav-size: 24px;
}

/* ===== Gift confirm button ===== */
.gift-confirm-button-container {
    width: 480px;
    padding: 8px;
    margin: 0 auto 4px auto;
}

.gift-confirm-button {
    display: block;
    margin: auto;
    width: 280px;
    height: 47px;
    border: none;
    border-radius: 4px;
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    font-size: 16px;
    letter-spacing: -0.24px;
    text-align: center;
    cursor: pointer;
    background-color: var(--gift-theme-color);
    color: #ffffff;
}

/* ===== Gift Dialog ===== */
.gift-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-overlay);
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    will-change: opacity, visibility;
}

.gift-dialog-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.gift-dialog-content {
    position: relative;
    width: 480px;
    max-height: 90vh;
    transition: transform var(--transition-fast);
    will-change: transform;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.gift-dialog-overlay.hidden .gift-dialog-content {
    transform: scale(0.9);
}

html.gift-dialog-open {
    overflow: clip;
    scrollbar-gutter: stable both-edges;
}

@supports not (overflow: clip) {
    html.gift-dialog-open {
        overflow: hidden;
    }
}

.gift-dialog-close-button {
    background: #FFFFFF url('../images/closeGiftDialog.png') center/16px no-repeat;
    box-shadow: 0px 1.25px 6px 0px #00000033;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 9999;
}

.gift-dialog-close-button:hover {
    opacity: 0.8;
}

.gift-dialog-scrollable-content {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 4px;
    overscroll-behavior: contain;
}

.gift-dialog-header {
    font-family: var(--font-family-secondary);
    font-weight: var(--font-weight-light);
    font-size: 12px;
    line-height: 130%;
    letter-spacing: 0.15px;
    display: flex;
    align-items: center;
    color: #000000;
    flex-direction: column;
}

.gift-dialog-body {
    padding: 24px 0px 22px 0px;
}

.gift-dialog-footer {
    text-align: center;
}

.gift-dialog-footer-text {
    font-family: var(--font-family-secondary);
    font-weight: var(--font-weight-semi-bold);
    font-size: 16px;
    line-height: 130%;
    letter-spacing: 0.15px;
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    position: relative;
    z-index: 1; /* ハイライトが前面に来ないようにするため */
}

.gift-dialog-footer-text-highlight {
    position: relative;
    display: inline-block;
}

.gift-dialog-footer-text-highlight::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    right: -4px;
    bottom: 0;
    background-color: #FFEE00;
    transform: skewX(-15deg);
    z-index: -1;
    border-radius: 2px;
}

.gift-dialog-footer-image {
    width: 197px;
    height: 116.91px;
    display: block;
    margin: 0 auto;
}

/* ギフト一覧カスタム */
sc-gift-list {
    --sc-gift-list-gap: 1.7rem;
    --sc-gift-item-border-color: var(--gift-theme-color);
    --sc-gift-item-title-color: var(--gift-theme-color);
    --sc-gift-item-lower-available-background-color: var(--gift-theme-color);
    --sc-gift-item-lower-text-locked-color: var(--gift-theme-color);
    --sc-gift-item-stamp-image: url('https://r.r10s.jp/evt/event/interior/stampcard/_pc/images/giftStamp.png');
    --sc-gift-item-stamp-text-font-family: var(--font-family-secondary);
    --sc-gift-item-title-font-family: var(--font-family-secondary);
    --sc-gift-item-period-font-family: var(--font-family-secondary);
    --sc-gift-item-terms-font-family: var(--font-family-secondary);
    --sc-gift-item-lower-text-locked-font-family: var(--font-family-secondary);
    --sc-gift-item-lower-text-available-font-family: var(--font-family-secondary);
    --sc-gift-item-lower-text-used-font-family: var(--font-family-secondary);
    --sc-gift-item-used-overlay-text-font-family: var(--font-family-primary);
}

/*===== Stamp Card Term ===== */
.stamp-card-term {
    list-style: none;
    text-align: center;
    color: #333333;
    font-weight: var(--font-weight-normal);
    font-size: 12px;
    line-height: 130%;
    padding: 0px;
    margin: 0px;
}
