/* Modern Admin Coupon Management Styles */

/* Coupon Creation Form - Compact Layout */
.coupon-creation-section {
    background: linear-gradient(135deg, rgba(19, 26, 41, 0.8) 0%, rgba(26, 32, 46, 0.9) 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.coupon-form-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.coupon-form-group {
    display: flex;
    flex-direction: column;
}

.coupon-form-group label {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-form-group input,
.coupon-form-group select {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #f8fafc;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 36px;
}

.coupon-form-group input:focus,
.coupon-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(30, 41, 59, 0.9);
}

.coupon-form-group small {
    color: #94a3b8;
    font-size: 10px;
    margin-top: 2px;
    line-height: 1.2;
}

/* Compact Action Button */
.coupon-create-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Coupon List Section - Compact */
.coupon-list-section {
    background: linear-gradient(135deg, rgba(19, 26, 41, 0.8) 0%, rgba(26, 32, 46, 0.9) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.coupon-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.coupon-list-header h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
}

.coupon-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.coupon-filter-compact {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: #f8fafc;
    font-size: 12px;
    min-width: 120px;
}

.coupon-refresh-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.coupon-refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Compact Table Styles */
.coupons-table-compact {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.coupons-table-compact th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.coupons-table-compact td {
    padding: 10px 8px;
    font-size: 12px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    vertical-align: middle;
}

.coupons-table-compact tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Compact Status Badges */
.coupon-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.coupon-status-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Compact Edit Button */
.coupon-edit-btn-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    justify-content: center;
}

.coupon-edit-btn-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Plan Restriction Badge */
.plan-restriction-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Usage Info Styling */
.usage-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.usage-current {
    color: #fbbf24;
    font-weight: 600;
}

.usage-limit {
    color: #94a3b8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .coupon-form-compact {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .coupon-list-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .coupon-controls {
        justify-content: space-between;
    }
    
    .coupons-table-compact {
        font-size: 11px;
    }
    
    .coupons-table-compact th,
    .coupons-table-compact td {
        padding: 8px 4px;
    }
}

/* Loading and Empty States */
.coupon-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.coupon-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.coupon-empty-state i {
    font-size: 48px;
    color: rgba(102, 126, 234, 0.3);
    margin-bottom: 16px;
}

.coupon-empty-state h4 {
    color: #e2e8f0;
    margin-bottom: 8px;
}

.coupon-empty-state p {
    color: #94a3b8;
    font-size: 14px;
}

/* Animation for smooth transitions */
.coupon-fade-in {
    animation: couponFadeIn 0.3s ease-out;
}

@keyframes couponFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Titles */
.coupon-section-title {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-section-title i {
    color: #667eea;
    font-size: 16px;
}

/* Collapse Button Styling */
.collapse-btn {
    background: transparent;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    color: #cbd5e1;
    cursor: pointer;
    padding: 8px 10px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.collapse-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

.collapse-btn i {
    transition: transform 0.3s ease;
}

/* Collapsible Content */
.collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Header Actions in Coupon List */
.coupon-list-header .coupon-controls {
    flex-shrink: 0;
}

/* Improved Mobile Responsiveness */
@media (max-width: 480px) {
    .coupon-section-title {
        font-size: 16px;
    }
    
    .coupon-form-compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .coupon-form-group label {
        font-size: 11px;
    }
    
    .coupon-form-group input,
    .coupon-form-group select {
        font-size: 13px;
        padding: 6px 10px;
        height: 32px;
    }
    
    .coupon-create-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .coupons-table-compact th,
    .coupons-table-compact td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .coupon-status-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .plan-restriction-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .coupon-edit-btn-compact {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 50px;
    }
}

/* Coupon Edit Modal Styling */
.coupon-edit-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease-out;
}

.coupon-edit-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.coupon-edit-modal-content {
    background: linear-gradient(135deg, rgba(19, 26, 41, 0.95) 0%, rgba(26, 32, 46, 0.98) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Header */
.coupon-edit-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(19, 26, 41, 0.95) 0%, rgba(26, 32, 46, 0.98) 100%);
    backdrop-filter: blur(10px);
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.coupon-edit-title {
    color: #f8fafc;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.coupon-edit-title i {
    color: #667eea;
    font-size: 20px;
}

.coupon-code-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
}

/* Close Button */
.coupon-edit-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.coupon-edit-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.05);
}

/* Modal Body */
.coupon-edit-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Status Message in Modal */
.coupon-edit-status {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

.coupon-edit-status.processing {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.coupon-edit-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.coupon-edit-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Edit Sections */
.coupon-edit-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(51, 65, 85, 0.4) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.coupon-edit-section:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.coupon-edit-section-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

.coupon-edit-section-title {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-edit-section-title i {
    color: #667eea;
    font-size: 16px;
}

.coupon-edit-section-body {
    padding: 25px;
}

.coupon-edit-section-footer {
    padding: 20px 25px;
    background: rgba(30, 41, 59, 0.3);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    text-align: right;
}

/* Form Groups in Modal */
.coupon-edit-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.coupon-edit-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.coupon-edit-form-group label {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-edit-form-group input,
.coupon-edit-form-group select {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #f8fafc;
    font-size: 15px;
    transition: all 0.3s ease;
    min-height: 44px;
}

.coupon-edit-form-group input:focus,
.coupon-edit-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: rgba(30, 41, 59, 0.9);
}

.coupon-edit-form-group textarea {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #f8fafc;
    font-size: 15px;
    transition: all 0.3s ease;
    resize: vertical;
    font-family: 'Inter', monospace;
    line-height: 1.5;
}

.coupon-edit-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: rgba(30, 41, 59, 0.9);
}

.coupon-edit-form-group textarea::placeholder {
    color: #64748b;
    opacity: 0.7;
}

/* Current restrictions display */
.current-restrictions-list {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #cbd5e1;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.current-restrictions-list i.fa-spinner {
    margin-right: 8px;
    color: #667eea;
}

.coupon-edit-form-group small {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}

/* Multi-select styling */
.coupon-edit-form-group select[multiple] {
    min-height: 120px;
    padding: 8px;
}

.coupon-edit-form-group select[multiple] option {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    background: rgba(51, 65, 85, 0.5);
    color: #f8fafc;
}

.coupon-edit-form-group select[multiple] option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Action Buttons */
.coupon-edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-width: 140px;
}

.coupon-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.coupon-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

/* Danger Zone */
.coupon-danger-zone {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.08) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.coupon-danger-zone .coupon-edit-section-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

.coupon-danger-zone .coupon-edit-section-title i {
    color: #ef4444;
}

.coupon-danger-warning {
    color: #fbbf24;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: 10px;
}

.coupon-danger-warning i {
    color: #f59e0b;
    font-size: 16px;
    margin-top: 2px;
}

.coupon-delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.coupon-delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Animation Keyframes */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .coupon-edit-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 16px;
    }
    
    .coupon-edit-header {
        padding: 20px 20px 15px;
    }
    
    .coupon-edit-title {
        font-size: 20px;
    }
    
    .coupon-edit-body {
        padding: 20px;
        gap: 20px;
    }
    
    .coupon-edit-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .coupon-edit-section-header,
    .coupon-edit-section-body,
    .coupon-edit-section-footer {
        padding: 15px 20px;
    }
} 