/* Modern Coupon Modal Styles */
.coupon-modal {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    background: white;
}

/* Override Bootstrap modal styles */
.modal-dialog.modal-dialog-centered {
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-content.coupon-modal {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-close-modal:hover {
    background: #fff;
    color: #333;
    transform: scale(1.1);
}

/* Modal Header Section */
.modal-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 25px 25px;
    color: white;
    position: relative;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo-wrapper {
    flex-shrink: 0;
}

.company-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.company-details {
    flex: 1;
}

.coupon-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.coupon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Coupon Code Section */
.coupon-code-section {
    padding: 25px;
    background: #f8f9fa;
}

.code-container {
    position: relative;
}

.code-display {
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
}

.coupon-input {
    flex: 1;
    border: none;
    padding: 18px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    background: transparent;
    text-align: center;
    letter-spacing: 1px;
}

.coupon-input:focus {
    outline: none;
}

.copy-button-wrapper {
    flex-shrink: 0;
}

.copy-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 18px 25px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.copy-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #28a745;
}

/* Success Message */
.success-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.success-message.show {
    opacity: 1;
    visibility: visible;
}

/* Offer Details */
.offer-details {
    padding: 25px;
    background: white;
}

.detail-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    font-size: 1.2rem;
    color: #667eea;
    margin-top: 2px;
}

.detail-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #333;
}

.detail-content p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Terms Section */
.terms-section {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.terms-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #333;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-list li {
    position: relative;
    padding: 8px 0 8px 20px;
    color: #666;
    line-height: 1.5;
}

.terms-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Action Buttons */
.modal-actions {
    padding: 25px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 25px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.feedback-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feedback-buttons span {
    font-weight: 600;
    color: #666;
    margin-right: 10px;
}

.btn-feedback {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 576px) {
    .coupon-modal {
        margin: 10px;
        border-radius: 15px;
    }
    
    .modal-header-section {
        padding: 20px 15px;
    }
    
    .company-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .coupon-title {
        font-size: 1.2rem;
    }
    
    .coupon-code-section,
    .offer-details,
    .terms-section,
    .modal-actions {
        padding: 20px 15px;
    }
    
    .code-display {
        flex-direction: column;
    }
    
    .copy-button {
        border-radius: 0 0 15px 15px;
        padding: 15px;
    }
    
    .coupon-input {
        border-radius: 15px 15px 0 0;
        padding: 15px;
    }
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.show .modal-dialog {
    animation: modalFadeIn 0.3s ease-out;
}

/* Fix for existing modal structure */
.modal-body.px-0.py-6.py-md-0 {
    padding: 0 !important;
}

.modal-body .d-center.flex-column.gap-2.gap-md-3.py-3.py-md-5 {
    padding: 1.5rem 0;
}

.modal-body .main-content.cus-border.border-top.border-bottom.b-seventh.d-grid.gap-3.gap-md-4.px-3.px-md-6.py-4.py-md-5 {
    padding: 1.5rem;
    margin: 0;
}

.modal-body .bottom-area.d-center.gap-1.gap-md-2.flex-wrap.py-3.py-md-5 {
    padding: 1.5rem;
    margin: 0;
}

/* Ensure modal content is properly styled */
.modal-content.coupon-modal .modal-body {
    background: white;
}

.modal-content.coupon-modal .company-logo.mb-3.d-center img {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.modal-content.coupon-modal .cmn-btn.btn-overlay.border-dash.rounded-pill.w-100.d-center.input-area {
    background: white;
    border: 2px dashed #667eea;
    border-radius: 25px;
    padding: 0;
    overflow: hidden;
}

.modal-content.coupon-modal .coupon-code {
    border: none;
    background: transparent;
    text-align: center;
    font-weight: bold;
    color: #333;
}

.modal-content.coupon-modal .box-style.box-second.rounded-pill.border-stb-none.py-3.py-md-4.px-6.px-md-12.d-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.modal-content.coupon-modal .box-style.box-second.rounded-pill.border-stb-none.py-3.py-md-4.px-6.px-md-12.d-center:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.modal-content.coupon-modal .box-style.box-second.rounded-pill.border-stb-none.py-3.py-md-4.px-6.px-md-12.d-center.copied {
    background: #28a745;
}
