/**
 * タイマークーポン - timer.css
 * ティファニーブルー × ヴィンテージアメリカン テーマ
 * RushOut 古着屋 — コンパクト右下フローティング
 */

/* ====== フローティングバー ====== */
.timer-coupon-bar {
    position: fixed;
    bottom: -200px;
    right: 16px;
    left: auto;
    z-index: 8500;
    background: linear-gradient(145deg, #0abab5 0%, #81d8d0 40%, #a8e6cf 100%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(10, 186, 181, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
    max-width: 340px;
    width: 340px;
    overflow: hidden;
}

.timer-coupon-bar.visible {
    bottom: 20px;
}

.timer-coupon-bar.expired {
    background: linear-gradient(145deg, #8a9a9a 0%, #b0bfbf 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ヴィンテージ風ストライプ装飾 */
.timer-coupon-bar::before {
    content: '';
    display: block;
    height: 4px;
    background: repeating-linear-gradient(90deg,
            #cc4444 0, #cc4444 20%,
            #fff 20%, #fff 40%,
            #1a2744 40%, #1a2744 60%,
            #fff 60%, #fff 80%,
            #cc4444 80%, #cc4444 100%);
    border-radius: 14px 14px 0 0;
}

.timer-coupon-inner {
    padding: 10px 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ====== ジーンズアイコン ====== */
.timer-coupon-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-coupon-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timer-coupon-bar.expired .timer-coupon-icon {
    opacity: 0.4;
}

/* ====== メッセージエリア ====== */
.timer-coupon-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.timer-coupon-label {
    color: #1a2744;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.timer-coupon-bar.expired .timer-coupon-label {
    color: #555;
    text-shadow: none;
}

.timer-coupon-copy-text {
    color: rgba(26, 39, 68, 0.7);
    font-size: 10px;
    line-height: 1.3;
}

/* ====== カウントダウン ====== */
.timer-coupon-countdown {
    display: flex;
    align-items: center;
    gap: 2px;
}

.timer-digit-group {
    display: flex;
    align-items: center;
    gap: 1px;
}

.timer-digit {
    background: #1a2744;
    color: #81d8d0;
    font-size: 18px;
    font-weight: 700;
    padding: 4px 5px;
    border-radius: 4px;
    min-width: 26px;
    text-align: center;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(129, 216, 208, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timer-separator {
    color: #1a2744;
    font-size: 16px;
    font-weight: 700;
    padding: 0 1px;
    animation: timer-blink 1s steps(1) infinite;
}

.timer-coupon-bar.expired .timer-digit {
    background: #666;
    color: #aaa;
    border-color: #555;
}

.timer-coupon-bar.expired .timer-separator {
    color: #888;
    animation: none;
}

/* ====== クーポンコード表示 ====== */
.timer-coupon-code-area {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.timer-coupon-code {
    background: rgba(26, 39, 68, 0.12);
    color: #1a2744;
    padding: 6px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border: 1px dashed rgba(26, 39, 68, 0.3);
    flex: 1;
    text-align: center;
}

.timer-copy-btn {
    padding: 6px 12px;
    background: #1a2744;
    color: #81d8d0;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    white-space: nowrap;
}

.timer-copy-btn:hover {
    background: #2a3a5a;
    transform: scale(1.02);
}

.timer-copy-btn:active {
    transform: scale(0.98);
}

.timer-copy-btn.copied {
    background: #2a8a2a;
    color: #fff;
}

/* ====== 閉じるボタン ====== */
.timer-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(26, 39, 68, 0.4);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    z-index: 10;
}

.timer-close-btn:hover {
    color: rgba(26, 39, 68, 0.8);
}

/* ====== 期限切れ ====== */
.timer-expired-text {
    color: #555;
    font-size: 12px;
}

/* ====== アニメーション ====== */
@keyframes timer-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0.3;
    }
}

/* ====== SP (モバイル) ====== */
@media (max-width: 768px) {
    .timer-coupon-bar {
        right: auto;
        left: 0;
        bottom: -200px;
        max-width: 300px;
        width: calc(100% - 8px);
        border-radius: 0 12px 0 0;
        border-left: none;
        border-bottom: none;
    }

    .timer-coupon-bar.visible {
        bottom: 0;
    }

    .timer-coupon-inner {
        padding: 8px 10px 10px;
        gap: 8px;
    }

    .timer-coupon-icon {
        width: 36px;
        height: 36px;
    }

    .timer-coupon-icon img {
        width: 32px;
        height: 32px;
    }

    .timer-digit {
        font-size: 14px;
        padding: 3px 4px;
        min-width: 22px;
    }

    .timer-coupon-label {
        font-size: 11px;
    }

    .timer-coupon-code {
        font-size: 11px;
        padding: 5px 8px;
    }

    .timer-copy-btn {
        font-size: 10px;
        padding: 5px 10px;
    }

    .timer-coupon-code-area {
        flex-wrap: nowrap;
    }
}