/* Consolidated Coupon Styles for Premium Glass Light Blue Template */

/* Admin Page Header */
.admin-page-header {
    margin-bottom: 2rem;
}

/* Coupon Section (Cart) */
.coupon-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.coupon-section h4 {
    margin: 0 0 1rem 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
}

.coupon-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.coupon-input-group button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: black;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon-input-group button:hover {
    background: #fff;
    transform: translateY(-1px);
}

.coupon-message {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.coupon-message.success {
    color: #10b981;
}

.coupon-message.error {
    color: #ef4444;
}

.applied-coupon {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.coupon-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.coupon-code-display {
    color: #10b981;
    font-weight: 600;
    font-size: 0.95rem;
}

.coupon-discount {
    color: #10b981;
    font-weight: 700;
}

.btn-remove {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

@media (max-width: 480px) {
    .coupon-section {
        padding: 1rem;
    }

    .coupon-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .coupon-input-group input,
    .coupon-input-group button {
        width: 100%;
    }

    .coupon-info {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .coupon-code-display,
    .coupon-discount {
        width: auto;
        max-width: 100%;
        word-break: break-word;
    }

    .btn-remove {
        width: 100%;
        margin-top: 0.25rem;
        text-align: center;
    }
}

/* Admin Coupon Table & Pilling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.status-pill {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pill.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-type {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.btn-action.edit:hover {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-action.delete:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Coupon Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    padding: 0;
    border-radius: 24px;
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-height: calc(100vh - 1rem);
        border-radius: 16px;
        width: 100%;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .form-group {
        padding: 1rem 1.5rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }
    
    .form-actions {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-height: 700px) {
    .modal-content {
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
}

.close {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: white;
}

.form-group {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.5;
    font-size: 0.8rem;
}

.form-actions {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    text-align: right;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}
