/* WooPoints Rewards System Frontend Styles */

/* Points Balance Display */
.woopoints-balance {
    font-weight: bold;
    color: #0073aa; /* WordPress blue */
}

/* Redemption Form */
.woopoints-redemption-form {
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 20px;
    background-color: #fcfcfc;
}

.woopoints-redemption-form input[type="number"] {
    width: 150px;
    margin-right: 10px;
}

.woopoints-message {
    margin-top: 10px;
}

/* Points to Earn on Cart/Checkout */
.woopoints-earning th, .woopoints-earning td {
    border-top: 1px solid #eee;
    padding: 8px 0;
}

.woopoints-earning td {
    font-weight: bold;
    color: #0073aa;
}

/* ============================================
   MODERN MY POINTS PAGE STYLING
   ============================================ */

.woopoints-my-account-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 20px 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Balance Card */
.woopoints-balance-card-wrapper {
    margin-bottom: 40px;
}

.woopoints-balance-card {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    border-radius: 16px !important;
    padding: 40px !important;
    color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 115, 170, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
}

.woopoints-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.woopoints-balance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.woopoints-balance-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.woopoints-balance-icon {
    font-size: 48px;
    opacity: 0.8;
}

.woopoints-balance-content {
    position: relative;
    z-index: 1;
}

.woopoints-balance-amount {
    font-size: 56px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    letter-spacing: -1px !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

.woopoints-balance-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* History Section */
.woopoints-history-section {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 30px !important;
    border: 1px solid #f0f0f0 !important;
    display: block !important;
    margin-top: 20px !important;
}

.woopoints-history-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f5f5f5;
}

.woopoints-history-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.woopoints-history-subtitle {
    margin: 0;
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

/* History Table */
.woopoints-history-table-wrapper {
    overflow-x: auto;
}

.woopoints-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.woopoints-history-table thead {
    background: #f9f9f9;
    border-bottom: 2px solid #e5e5e5;
}

.woopoints-history-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woopoints-history-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.woopoints-history-table tbody tr:hover {
    background-color: #fafafa;
}

.woopoints-history-table td {
    padding: 16px 12px;
    vertical-align: middle;
}

/* Column Styling */
.woopoints-col-date {
    width: 15%;
}

.woopoints-col-type {
    width: 18%;
}

.woopoints-col-points {
    width: 15%;
    text-align: right;
}

.woopoints-col-reason {
    width: 52%;
}

/* Date Badge */
.woopoints-date-badge {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Type Badge */
.woopoints-type-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.woopoints-type-earned {
    background: #d4edda;
    color: #155724;
}

.woopoints-type-redeemed {
    background: #f8d7da;
    color: #721c24;
}

/* Amount Styling */
.woopoints-amount {
    font-weight: 700;
    font-size: 15px;
}

.woopoints-amount-positive {
    color: #28a745;
}

.woopoints-amount-negative {
    color: #dc3545;
}

/* Order Link */
.woopoints-order-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.woopoints-order-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Empty State */
.woopoints-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #e5e5e5;
}

.woopoints-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.woopoints-empty-message {
    margin: 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Floating Points Widget */
#woopoints-floating-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #0073aa;
    border-right: none;
    border-radius: 30px 0 0 30px;
    box-shadow: -4px 4px 15px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

#woopoints-floating-widget.collapsed {
    width: 50px;
}

#woopoints-floating-widget.expanded {
    width: auto;
    max-width: 300px;
    padding-right: 10px;
}

.woopoints-widget-toggle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0073aa;
    color: #ffffff;
    border-radius: 50% 0 0 50%;
    font-size: 24px;
    flex-shrink: 0;
}

.woopoints-widget-content {
    padding: 0 15px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 16px;
}

#woopoints-floating-widget.expanded .woopoints-widget-content {
    opacity: 1;
    visibility: visible;
}

.woopoints-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.woopoints-value {
    font-weight: bold;
    color: #0073aa;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .woopoints-my-account-container {
        padding: 15px;
    }

    .woopoints-balance-card {
        padding: 30px 20px;
    }

    .woopoints-balance-card-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .woopoints-balance-icon {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .woopoints-balance-title {
        font-size: 20px;
    }

    .woopoints-balance-amount {
        font-size: 42px;
    }

    .woopoints-history-section {
        padding: 20px;
    }

    .woopoints-history-table {
        font-size: 12px;
    }

    .woopoints-history-table th,
    .woopoints-history-table td {
        padding: 12px 8px;
    }

    .woopoints-col-date,
    .woopoints-col-type,
    .woopoints-col-points,
    .woopoints-col-reason {
        width: auto;
    }

    .woopoints-date-badge {
        padding: 4px 8px;
        font-size: 11px;
    }

    .woopoints-type-badge {
        padding: 4px 10px;
        font-size: 10px;
    }

    .woopoints-amount {
        font-size: 13px;
    }

    .woopoints-empty-state {
        padding: 40px 15px;
    }

    .woopoints-empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .woopoints-empty-message {
        font-size: 14px;
    }

    #woopoints-floating-widget {
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        right: 0 !important;
    }
}

@media (max-width: 480px) {
    .woopoints-balance-card {
        padding: 20px 15px;
    }

    .woopoints-balance-title {
        font-size: 18px;
    }

    .woopoints-balance-amount {
        font-size: 36px;
    }

    .woopoints-balance-subtitle {
        font-size: 12px;
    }

    .woopoints-history-section {
        padding: 15px;
    }

    .woopoints-history-title {
        font-size: 18px;
    }

    .woopoints-history-table {
        font-size: 11px;
    }

    .woopoints-history-table th,
    .woopoints-history-table td {
        padding: 10px 6px;
    }

    .woopoints-empty-state {
        padding: 30px 10px;
    }

    .woopoints-empty-icon {
        font-size: 40px;
    }

    .woopoints-empty-message {
        font-size: 13px;
    }
}

/* Mobile Money Gateway Styles */
.wc-payment-form fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

#wc-woopoints_mobile_money-form .form-row {
    margin-bottom: 15px;
}

#wc-woopoints_mobile_money-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#wc-woopoints_mobile_money-form select,
#wc-woopoints_mobile_money-form input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
