/* スタンプ帳モーダルスタイル */

#stampModal .modal-dialog {
    max-width: 800px;
}

#stampModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* スタンプ総数表示 */
#stamp-total {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    text-align: center;
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #203354;
    font-size: 1.2em;
}

/* スタンプカテゴリ */
.stamp-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fafafa;
}

.stamp-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stamp-category-header h6 {
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #203354;
    text-align: left;
}

.stamp-category-header .badge {
    font-size: 0.9rem;
    padding: 0.4em 0.8em;
}

.stamp-category-date {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

/* スタンプグリッド */
.stamp-grid {
    margin-top: 10px;
}

/* スタンプアイテム */
.stamp-item {
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    border: none !important;
}

.stamp-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #2196f3;
}

.stamp-image-container {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding-top: 100%; /* 正方形を維持 */
    overflow: hidden;
}

@media (max-width: 768px) {
    .stamp-image-container {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .stamp-image-container {
        max-width: 120px;
    }
}

.stamp-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.stamp-name {
    color: #203354;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stamp-date {
    color: #666;
    font-size: 0.75rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #stampModal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem;
    }

    .stamp-category {
        padding: 10px;
    }

    .stamp-category-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .stamp-category-header .badge {
        align-self: flex-end;
    }

    .stamp-item .card-body {
        padding: 8px !important;
    }

    .stamp-name {
        font-size: 0.85rem;
    }

    .stamp-date {
        font-size: 0.7rem;
    }
}

/* ローディングアニメーション */
#stamp-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* エラー表示 */
#stamp-error {
    border-radius: 8px;
}

/* 空の状態 */
.text-muted {
    color: #999 !important;
}

/* 通常カテゴリ専用スタイル */
.stamp-category-normal-content {
    padding: 15px;
    justify-content: center;
}

.stamp-category-normal-image {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .stamp-category-normal-image {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .stamp-category-normal-image {
        width: 120px;
        height: 120px;
    }
}

.stamp-category-normal-image .stamp-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.stamp-category-normal-badge {
    font-size: 1.5rem !important;
    padding: 0.5em 1em;
    text-align: center;
}

/* スタンプ詳細モーダル */
#stampDetailModal {
    z-index: 1070 !important;
}

#stampDetailModal 

#stampDetailModal .modal-dialog {
    z-index: 1071 !important;
}

#stampDetailModal .modal-content {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

#stampDetailModal .modal-body {
    padding: 2rem 3rem 2.5rem;
    border-radius: 0;
    background-color: #fafafa;
}

/* 閉じるボタン */
.stamp-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #203354;
    padding: 0.5rem;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s;
}

.stamp-detail-close:hover {
    color: #000;
    transform: scale(1.1);
}

/* タイトル */
.stamp-detail-title {
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #203354;
    font-size: 1.1rem;
    font-weight: 500;
}

/* スタンプ詳細画像 */
.stamp-detail-image-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding-top: 100%; /* 正方形 */
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .stamp-detail-image-container {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .stamp-detail-image-container {
        max-width: 200px;
    }
}

.stamp-detail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

/* スタンプ詳細テキスト */
#stampDetailName {
    font-family: 'Noto Sans', system-ui, sans-serif;
    color: #203354;
    font-size: 1rem;
    font-weight: 500;
}

#stampDetailDate {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

/* ナビゲーションボタン */
.stamp-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #203354;
    padding: 0.5rem;
    z-index: 10;
    transition: all 0.2s;
}

.stamp-nav-btn:hover {
    color: #2196f3;
    background: transparent;
}

.stamp-nav-prev {
    left: 0.5rem;
}

.stamp-nav-next {
    right: 0.5rem;
}

.stamp-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.stamp-nav-btn:disabled:hover {
    color: #203354;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #stampDetailModal .modal-body {
        padding: 1rem 2.5rem 1.5rem;
    }

    .stamp-detail-image-container {
        max-width: 250px;
    }

    .stamp-nav-prev {
        left: 0.25rem;
    }

    .stamp-nav-next {
        right: 0.25rem;
    }
}
