/* Bonus Credits Styles */

.wc-qsm-credits-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

.wc-qsm-total-credits {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.wc-qsm-total-credits h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.credits-amount {
    font-size: 48px;
    font-weight: bold;
    color: #3875F1;
    margin: 10px 0;
}

.wc-qsm-redeem-code {
    background: #fff;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wc-qsm-redeem-code h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.wc-qsm-redeem-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.wc-qsm-redeem-form input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.wc-qsm-redeem-form button {
    padding: 12px 24px;
    background: #3875F1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.wc-qsm-redeem-form button:hover {
    background: #2a5fd0;
}

.wc-qsm-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

.wc-qsm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.wc-qsm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.wc-qsm-credits-list {
    background: #fff;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.wc-qsm-credits-list h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.wc-qsm-credits-list table {
    width: 100%;
    border-collapse: collapse;
}

.wc-qsm-credits-list table th,
.wc-qsm-credits-list table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.wc-qsm-credits-list table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Homepage Bonus Credits Section */

.wc-qsm-bonus-credits-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bonus-credits-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.bonus-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.bonus-credit-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.bonus-credit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.bonus-voucher {
    background: #3875F1;
    padding: 30px;
    text-align: center;
    color: #fff;
    position: relative;
}

.bonus-voucher.welcome-bonus {
    background:  #3875F1;
}

.bonus-voucher.social-bonus {
    background:  #3875F1;
}

.voucher-header h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.voucher-amount {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
    color: #fff;
}

.voucher-description {
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
    color: rgba(255,255,255,0.95);
}

.voucher-placeholder {
    margin-top: 20px;
    padding: 10px;
    background: #ea7900;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bonus-description {
    padding: 20px;
    background: #f8f9fa;
}

.bonus-description p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.bonus-voucher-image {
    width: 100%;
    text-align: center;
    padding: 0;
}

.bonus-voucher-image img {
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
    display: block;
}

/* Admin Styles */
.wc-qsm-bonus-credits-admin .wc-qsm-admin-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wc-qsm-bonus-credits-admin .wc-qsm-admin-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* My Account Menu Icons */
.woocommerce-MyAccount-navigation ul li a .dashicons {
    font-family: dashicons;
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 8px;
    text-decoration: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
}

/* Bonus Credits Section - Matching Coupon Design */
.wc-qsm-credits-wrapper {
    margin: 15px 0;
    padding: 0;
}

.wc-qsm-credits-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

.wc-qsm-credits-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.wc-qsm-credits-toggle-icon {
    display: inline-flex;
    align-items: center;
    color: #666;
    transition: transform 0.2s ease;
}

.wc-qsm-credits-toggle-icon.expanded {
    transform: rotate(180deg);
}

.wc-qsm-credits-content {
    padding-top: 10px;
    animation: wc-qsm-slideDown 0.3s ease;
}

@keyframes wc-qsm-slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.wc-qsm-credits-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.wc-qsm-credits-checkbox {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wc-qsm-credits-checkbox-text {
    font-size: 14px;
}

.wc-qsm-credits-available {
    color: #3875F1;
    font-weight: bold;
    margin-left: 8px;
    font-size: 14px;
}

.wc-qsm-credits-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.wc-qsm-credits-amount-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.wc-qsm-credits-amount-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease;
}

.wc-qsm-credits-amount-input:focus {
    outline: none;
    border-color: #3875F1;
}

.wc-qsm-credits-amount-input::placeholder {
    color: #999;
}

.wc-qsm-credits-apply-button {
    padding: 10px 20px;
    background: #3875F1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 28px;
    white-space: nowrap;
}

.wc-qsm-credits-apply-button:hover {
    background: #2a5fd0;
}

.wc-qsm-credits-apply-button:active {
    background: #1f4aa8;
}

/* Loading State for AJAX */
.wc-qsm-credits-wrapper.wc-qsm-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.wc-qsm-credits-wrapper.wc-qsm-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3875F1;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wc-qsm-spin 0.6s linear infinite;
}

@keyframes wc-qsm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.wc-qsm-credits-message {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 4px;
    animation: wc-qsm-fadeIn 0.3s ease-in;
}

@keyframes wc-qsm-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Notification System (SweetAlert-like) */
#wc-qsm-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.wc-qsm-notification {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid;
    position: relative;
    min-width: 300px;
}

.wc-qsm-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.wc-qsm-notification-success {
    border-left-color: #10b981;
}

.wc-qsm-notification-error {
    border-left-color: #ef4444;
}

.wc-qsm-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-qsm-notification-success .wc-qsm-notification-icon {
    color: #10b981;
}

.wc-qsm-notification-error .wc-qsm-notification-icon {
    color: #ef4444;
}

.wc-qsm-notification-icon svg {
    width: 100%;
    height: 100%;
}

.wc-qsm-notification-content {
    flex: 1;
    min-width: 0;
}

.wc-qsm-notification-message {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

.wc-qsm-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.wc-qsm-notification-close:hover {
    background: #f3f4f6;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    #wc-qsm-notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .wc-qsm-notification {
        min-width: auto;
    }
    
    .bonus-credits-grid {
        grid-template-columns: 1fr;
    }
    
    .wc-qsm-redeem-form {
        flex-direction: column;
    }
    
    .credits-amount {
        font-size: 36px;
    }
}

