/* ハプバーアプリケーション - カウンターカードスタイル */
/* HapBar Application - Counter Card Styles */

/* 更新時刻表示 */
.store-counters-timestamp {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.store-counters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    padding: 0;
}

.store-counter-card {
    background: #000;
    border-radius: 16px;
    padding: 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 背景画像用のコンテナ */
.store-counter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 0;
}

/* 黒のオーバーレイ */
.store-counter-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.store-counter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

.store-counter-card .store-name {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Swellの見出しスタイルをリセット */
    padding: 0 !important;
    border: none !important;
    background: none !important;
    line-height: 1.4 !important;
}

.store-counter-card .store-name::before,
.store-counter-card .store-name::after {
    display: none !important;
}

.store-counter-card .store-count {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    margin-top: 5px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* 店舗別背景画像（CSS変数はPHP側で設定） */
.store-counter-card[data-store="カラーズバー"]::before {
    background-image: var(--store-bg-colors);
}

.store-counter-card[data-store="パピヨン"]::before {
    background-image: var(--store-bg-papillon);
}

.store-counter-card[data-store="リトリートバー"]::before {
    background-image: var(--store-bg-retreat);
}

.store-counter-card[data-store="Neo"]::before {
    background-image: var(--store-bg-neo);
}

.store-counter-card[data-store="アグリーアブル"]::before {
    background-image: var(--store-bg-agreeable);
}

.store-counter-card[data-store="アラベスク"]::before {
    background-image: var(--store-bg-arabesque);
}

.store-counter-card[data-store="ビーダッシュ"]::before {
    background-image: var(--store-bg-bdash);
}

.store-counter-card[data-store="もぐら"]::before {
    background-image: var(--store-bg-mogura);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .store-counters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .store-counters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .store-counter-card {
        min-height: 180px;
    }

    .store-counter-card .store-name {
        font-size: 20px;
    }

    .store-counter-card .store-count {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .store-counters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .store-counter-card {
        min-height: 150px;
    }

    .store-counter-card .store-name {
        font-size: 18px;
    }

    .store-counter-card .store-count {
        font-size: 28px;
    }
}

/* エラー状態 */
.store-counter-card.error::after {
    background: rgba(139, 0, 0, 0.7);
}

.store-counter-card.error .store-name,
.store-counter-card.error .store-count {
    color: #fff;
}

/* ローディング状態 */
.store-counter-card.loading .store-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: normal;
}

.store-counter-card.loading .loading-text {
    display: inline-block;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ローディングドット */
.store-counter-card.loading .loading-text::after {
    content: '...';
    display: inline-block;
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
