/**
 * Gosy Gamification - Frontend Styles
 */

/* Balance Card */
.gosy-points-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-family: inherit;
    border: 1px solid #eee;
    margin: 20px 0 20px!important;
    max-width: 100%;
}

.gosy-points-icon {
    font-size: 24px;
    background: #f0f7ff;
    color: #0073aa;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gosy-points-info {
    display: flex;
    flex-direction: column;
}

.gosy-points-label {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.2;
}

.gosy-points-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

/* Verification Warning Cards */
.gosy-verification-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gosy-verification-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border-left: 5px solid #ffba00; /* Warning Yellow */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gosy-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gosy-card-icon {
    color: #ffba00;
    font-size: 20px;
}

.gosy-card-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.gosy-card-body {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.gosy-card-points {
    display: inline-block;
    background: #e7f7ed;
    color: #2c8c4a;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.gosy-card-footer {
    margin-top: auto;
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* History Table Styles (Enhanced) */
.gosy-points-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.gosy-points-history-table thead {
    background-color: #f8f9fa;
}

.gosy-points-history-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #eee;
}

.gosy-points-history-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.gosy-points-history-table tr:last-child td {
    border-bottom: none;
}

.gosy-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.gosy-status-approved { background-color: #e6fffa; color: #2c7a7b; }
.gosy-status-pending { background-color: #fffaf0; color: #c05621; }
.gosy-status-rejected { background-color: #fff5f5; color: #c53030; }

.gosy-points-positive { color: #2f855a; font-weight: 600; }
.gosy-points-negative { color: #c53030; font-weight: 600; }

/* Pagination */
.gosy-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.gosy-pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    background: #fff;
    transition: all 0.2s;
}

.gosy-pagination .page-numbers.current,
.gosy-pagination .page-numbers:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Responsive */
@media (max-width: 600px) {
    .gosy-points-history-table th, 
    .gosy-points-history-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .gosy-points-history-table th:nth-child(4), /* Status */
    .gosy-points-history-table td:nth-child(4) {
        display: none;
    }
}

/* Rewards Grid */
.gosy-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0!important;
}

.gosy-reward-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.gosy-reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.gosy-reward-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.gosy-reward-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gosy-reward-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    line-height: 1.3;
}

.gosy-reward-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.gosy-reward-cost {
    color: var(--theme-palette-color-1);
    font-weight: 700;
}

.gosy-reward-stock {
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.gosy-reward-expiration {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    font-style: italic;
}

.gosy-redeem-btn {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background: var(--theme-palette-color-1);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.gosy-redeem-btn:hover {
    background: var(--theme-palette-color-2);
}

.gosy-redeem-btn.disabled,
.gosy-redeem-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

.gosy-redeem-btn.gosy-loading {
    opacity: 0.7;
    cursor: wait;
}

/* Modal */
.gosy-modal-open {
    overflow: hidden;
}

.gosy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.gosy-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: gosyModalFadeIn 0.3s ease-out;
}

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

.gosy-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.gosy-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.gosy-modal-close {
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.gosy-modal-close:hover {
    color: #333;
}

.gosy-modal-body {
    padding: 30px 20px;
    text-align: center;
}

.gosy-modal-instructions {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* Redemption Card */
.gosy-redemption-card {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,115,170,0.15);
}

.gosy-card-brand {
    background: #0073aa;
    color: #fff;
    padding: 15px 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.gosy-card-content {
    padding: 20px;
}

.gosy-card-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.gosy-card-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gosy-card-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.gosy-card-value.highlight {
    color: #0073aa;
    font-weight: 700;
    font-size: 18px;
}

.gosy-card-code-container {
    background: #f0f7ff;
    border: 2px dashed #b3d7ff;
    padding: 15px;
    text-align: center;
    margin: 20px 0;
    border-radius: 8px;
}

.gosy-card-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-palette-color-2);
    letter-spacing: 1px;
}

.gosy-card-footer {
    font-size: 12px;
    color: #888;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}