/**
 * リワード機能 フロントエンド スタイル
 * Reward Feature: Frontend Styles
 *
 * @package Barom
 * @version 1.0.0
 */

/* ========================================
   リワードカタログ
======================================== */
.barom-rewards-catalog {
    margin-bottom: 2rem;
}

.barom-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.barom-rewards-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.barom-current-points {
    font-size: 1.1rem;
    color: #555;
}

.barom-current-points strong {
    font-size: 1.5rem;
    color: #d35400;
    font-weight: 700;
}

.barom-no-rewards {
    text-align: center;
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ========================================
   リワードグリッド
======================================== */
.barom-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .barom-rewards-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   リワードカード
======================================== */
.barom-reward-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.barom-reward-card:hover {
    border-color: #d35400;
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.15);
    transform: translateY(-2px);
}

.barom-reward-card.barom-reward-disabled {
    opacity: 0.6;
    border-color: #ddd;
}

.barom-reward-card.barom-reward-disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.barom-reward-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f5f5f5;
}

.barom-reward-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.barom-reward-content {
    padding: 1.25rem;
}

.barom-reward-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1em 0;
    line-height: 1.4;
}

.barom-reward-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.barom-reward-points {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 6px;
}

.barom-points-required {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d35400;
}

.barom-stock {
    font-size: 0.85rem;
    color: #999;
}

.barom-reward-request-form {
    margin: 0;
}

.barom-btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.barom-btn-primary {
    background: #d35400;
    color: #fff;
}

.barom-btn-primary:hover {
    background: #bf4c00;
}

.barom-btn-disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
}

.barom-rewards-note {
    padding: 1rem 1.5rem;
    background: #fffbf0;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   リワード申請履歴
======================================== */
.barom-reward-requests {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.barom-reward-requests h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.barom-no-data {
    text-align: center;
    padding: 2rem;
    margin-top: 1rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

.barom-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ========================================
   リクエストアイテム
======================================== */
.barom-request-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.barom-request-item:hover {
    border-color: #ccc;
}

.barom-request-status-pending {
    border-left: 4px solid #f0ad4e;
}

.barom-request-status-approved {
    border-left: 4px solid #5cb85c;
}

.barom-request-status-completed {
    border-left: 4px solid #337ab7;
}

.barom-request-status-rejected {
    border-left: 4px solid #d9534f;
}

.barom-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.barom-request-date {
    font-size: 0.9rem;
    color: #999;
}

.barom-request-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: #f5f5f5;
}

.barom-request-reward-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.barom-request-points {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

/* ========================================
   QRコード表示
======================================== */
.barom-request-qr {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f8ff;
    border: 2px dashed #5cb85c;
    border-radius: 8px;
}

.barom-request-qr p {
    margin: 0 0 0.5rem 0;
}

.barom-qr-code-display {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin: 1rem 0;
}

.barom-qr-code-display code {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.barom-qr-expires {
    font-size: 0.85rem;
    color: #999;
}

.barom-qr-instruction {
    font-size: 0.9rem;
    color: #5cb85c;
    font-weight: 600;
}

.barom-admin-note {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fff3cd;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #856404;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 600px) {
    .barom-rewards-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .barom-current-points {
        font-size: 1rem;
    }

    .barom-current-points strong {
        font-size: 1.3rem;
    }

    .barom-request-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .barom-request-item {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .barom-request-date {
        font-size: 0.75rem;
    }

    .barom-request-status {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    .barom-request-reward-name {
        font-size: 0.95rem;
        margin: 0 0 0.3rem 0;
    }

    .barom-request-points {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .barom-requests-list {
        gap: 0.75rem;
    }

    .barom-request-qr {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }

    .barom-qr-code-display {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .barom-qr-code-display code {
        font-size: 1rem;
    }

    .barom-admin-note {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   ポイント内訳表示
======================================== */
.points-breakdown {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.points-breakdown p {
    margin: 0.25rem 0;
}

.pending-points span {
    color: #f39c12;
    font-weight: 600;
}

.available-points span {
    color: #27ae60;
    font-weight: 600;
}

/* ========================================
   数量コントロール
======================================== */
.barom-quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 0.5rem 0;
}

.barom-qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #d35400;
    background: #fff;
    color: #d35400;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.barom-qty-btn:hover {
    background: #d35400;
    color: #fff;
}

.barom-qty-input {
    width: 60px;
    height: 36px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

.barom-total-points {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    margin: 0.5rem 0 1rem 0;
}

.barom-total-points span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d35400;
}

/* ========================================
   確認モーダル
======================================== */
.barom-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.barom-reward-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.barom-reward-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.barom-reward-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.barom-reward-modal-body {
    padding: 1.5rem;
}

.barom-reward-modal-item {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: #333;
}

.barom-reward-modal-qty,
.barom-reward-modal-total {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #666;
}

.barom-reward-modal-total strong {
    font-size: 1.3rem;
    color: #d35400;
}

.barom-reward-modal-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fffbf0;
    border-left: 3px solid #f39c12;
    font-size: 0.85rem;
    color: #666;
}

.barom-reward-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.barom-modal-cancel,
.barom-modal-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.barom-modal-cancel {
    background: #f0f0f0;
    color: #666;
}

.barom-modal-cancel:hover {
    background: #e0e0e0;
}

.barom-modal-submit {
    background: #d35400;
    color: #fff;
}

.barom-modal-submit:hover {
    background: #bf4c00;
}
