/* Coupon Sidebar Styles */

/* Sidebar */
.coupon-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    font-family: 'Poppins', sans-serif;
}

.coupon-sidebar.open {
    right: 0;
}

/* Sidebar Header */
.coupon-sidebar-header {
    background: linear-gradient(135deg, #62957f 0%, #4a7660 100%);
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coupon-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}
.coupon-content p{
    font-size: 16px !important;
}

.coupon-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.coupon-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Content */
.coupon-sidebar-content {
    padding: 20px;
}

/* Coupon Card */
.coupon-card {
    background: #ffffff;
    border: 2px solid #e8f4f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    max-height: 90px;
    display: flex;
    align-items: stretch;
}

.coupon-card:hover {
    border-color: #62957f;
    box-shadow: 0 4px 20px rgba(98, 149, 127, 0.15);
    transform: translateY(-2px);
}

/* Coupon Discount Section */
.coupon-discount {
    background: linear-gradient(135deg, #62957f 0%, #4a7660 100%);
    color: white;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

.coupon-code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.coupon-code-text {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px dashed rgba(255, 255, 255, 0.8);
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    min-width: 0;
    word-break: break-all;
    line-height: 1.1;
    text-align: center;
}

.coupon-code-text.coupon-code-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.coupon-code-text.coupon-code-clickable:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.coupon-code-text.coupon-code-clickable.copied {
    background: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.8);
}

.coupon-code-text.coupon-code-clickable.copied::after {
    content: ' ✓';
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

/* Coupon Info */
.coupon-info {
    padding: 8px 12px;
    background: #f8fdf9;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 4px;
}

.coupon-description {
    font-size: 11px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    margin-bottom: 2px;
}

.coupon-min-order {
    font-size: 12px;
    font-weight: 700;
    color: #62957f;
    background: #e8f4f0;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #62957f;
    display: inline-block;
    width: fit-content;
    margin: 2px 0;
}

.coupon-expiry {
    font-size: 9px;
    color: #e74c3c;
    font-weight: 500;
    margin: 2px 0;
}

/* Coupon Actions */
.coupon-actions {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    background: #ffffff;
    border-left: 1px solid #e8f4f0;
    flex: 0 0 auto;
    justify-content: center;
    min-width: 70px;
}

.coupon-apply-btn {
    background: #62957f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    width: 100%;
    min-height: 32px;
}

.coupon-apply-btn:hover {
    background: #4a7660;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(98, 149, 127, 0.3);
}

.coupon-apply-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* Overlay */
.coupon-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.coupon-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* No Coupons State */
.no-coupons {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-coupons p {
    margin: 0;
    font-size: 14px;
}

/* Success/Error Messages */
.coupon-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    max-width: 300px;
    word-wrap: break-word;
}

.coupon-message.show {
    transform: translateX(0);
}

.coupon-message.success {
    background: #28a745;
}

.coupon-message.error {
    background: #dc3545;
}


.coupon-apply-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

.view-coupons-btn{
    margin: 0 auto;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .coupon-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .coupon-card {
        margin-bottom: 12px;
        min-height: 70px;
        max-height: 80px;
    }
    
    .coupon-discount {
        padding: 6px;
        min-width: 80px;
        max-width: 100px;
    }
    
    .coupon-code-text {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .coupon-description {
        font-size: 10px;
    }
    
    .coupon-min-order {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .coupon-message {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .coupon-message.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .coupon-sidebar-content {
        padding: 15px;
    }
    
    .coupon-sidebar-header {
        padding: 15px;
    }
    
    .coupon-sidebar-header h3 {
        font-size: 16px;
    }
}
