/* ==========================================
   CALL ME BACK MODAL - Professional Islamic Design
   Clean, Stylish & Responsive
   ========================================== */

/* Modal Backdrop Override */
#callMeBackModal.modal {
    z-index: 999999 !important;
}

#callMeBackModal .modal-backdrop {
    background-color: rgba(102, 65, 49, 0.6);
    backdrop-filter: blur(3px);
}

/* Modal Dialog */
#callMeBackModal .modal-dialog {
    max-width: 480px;
}

/* Modal Content */
.cmb-modal-content {
    background: white;
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 65, 49, 0.25);
    position: relative;
}

/* Decorative Top Border */
.cmb-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #a88d5e, #e59756, #a88d5e);
}

/* Islamic Pattern Background */
.cmb-modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(168, 141, 94, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(102, 65, 49, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(168, 141, 94, 0.02) 10px, rgba(168, 141, 94, 0.02) 20px);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   MODAL HEADER
   ========================================== */

.cmb-modal-header {
    padding: 35px 35px 25px;
    text-align: center;
    position: relative;
    border-bottom: none;
    z-index: 1;
}

/* Header Icon */
.cmb-header-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #a88d5e, #e59756);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(168, 141, 94, 0.35);
    animation: iconPulse 2s ease-in-out infinite;
}

.cmb-header-icon i {
    font-size: 1.8rem;
    color: white;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(168, 141, 94, 0.35);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(168, 141, 94, 0.45);
    }
}

/* Modal Title */
.cmb-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #664131;
    margin: 0;
    position: relative;
}

/* Close Button */
.cmb-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #664131;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.cmb-close-btn:hover {
    background: #664131;
    color: white;
    transform: rotate(90deg);
}

.cmb-close-btn i {
    font-size: 1rem;
}

/* ==========================================
   MODAL BODY
   ========================================== */

.cmb-modal-body {
    padding: 0 35px 35px;
    position: relative;
    z-index: 1;
}

/* Alert Messages */
.cmb-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmb-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cmb-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cmb-alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ==========================================
   FORM STYLING
   ========================================== */

.cmb-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Form Group */
.cmb-form-group {
    display: flex;
    flex-direction: column;
}

/* Form Label */
.cmb-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #664131;
    margin-bottom: 8px;
}

.cmb-label i {
    color: #a88d5e;
    font-size: 0.95rem;
}

.cmb-required {
    color: #dc3545;
    margin-left: 2px;
}

/* Form Input */
.cmb-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cmb-input:focus {
    border-color: #a88d5e;
    outline: none;
    box-shadow: 0 0 0 4px rgba(168, 141, 94, 0.1);
    background: #fefefe;
}

.cmb-input::placeholder {
    color: #aaa;
}

/* Captcha Wrapper */
.cmb-captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.cmb-captcha-image {
    height: 45px !important;
    max-height: 45px !important;
    width: auto !important;
    max-width: 150px !important;
    border-radius: 8px;
    border: 2px solid #e8e8e8;
    object-fit: contain;
    background: #f8f9fa;
    padding: 5px;
    aspect-ratio: auto !important;
}

.cmb-captcha-refresh {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a88d5e, #e59756);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cmb-captcha-refresh:hover {
    background: linear-gradient(135deg, #664131, #a88d5e);
    transform: rotate(180deg);
    box-shadow: 0 4px 15px rgba(168, 141, 94, 0.3);
}

/* ==========================================
   SUBMIT BUTTON
   ========================================== */

.cmb-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #664131, #a88d5e);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(102, 65, 49, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.cmb-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a88d5e, #e59756);
    transition: left 0.5s ease;
}

.cmb-submit-btn:hover::before {
    left: 0;
}

.cmb-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(168, 141, 94, 0.4);
}

.cmb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cmb-submit-btn .btn-text,
.cmb-submit-btn .btn-loading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==========================================
   MODAL ANIMATIONS
   ========================================== */

#callMeBackModal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.8);
}

#callMeBackModal.show .modal-dialog {
    transform: scale(1);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 991px) {
    #callMeBackModal .modal-dialog {
        max-width: 450px;
        margin: 1rem;
    }

    .cmb-modal-header {
        padding: 30px 30px 20px;
    }

    .cmb-modal-body {
        padding: 0 30px 30px;
    }

    .cmb-header-icon {
        width: 65px;
        height: 65px;
    }

    .cmb-header-icon i {
        font-size: 1.6rem;
    }

    .cmb-modal-title {
        font-size: 1.75rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #callMeBackModal .modal-dialog {
        max-width: calc(100% - 30px);
        margin: 15px auto;
    }

    .cmb-modal-header {
        padding: 25px 25px 20px;
    }

    .cmb-modal-body {
        padding: 0 25px 25px;
    }

    .cmb-header-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .cmb-header-icon i {
        font-size: 1.5rem;
    }

    .cmb-modal-title {
        font-size: 1.625rem;
    }

    .cmb-close-btn {
        width: 32px;
        height: 32px;
        top: 15px;
        right: 15px;
    }

    .cmb-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .cmb-form {
        gap: 16px;
    }

    .cmb-submit-btn {
        padding: 14px 25px;
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 575px) {
    #callMeBackModal .modal-dialog {
        max-width: calc(100% - 20px);
        margin: 10px auto;
    }

    .cmb-modal-header {
        padding: 22px 20px 18px;
    }

    .cmb-modal-body {
        padding: 0 20px 22px;
    }

    .cmb-header-icon {
        width: 55px;
        height: 55px;
    }

    .cmb-header-icon i {
        font-size: 1.4rem;
    }

    .cmb-modal-title {
        font-size: 1.5rem;
    }

    .cmb-label {
        font-size: 0.85rem;
    }

    .cmb-input {
        padding: 11px 13px;
        font-size: 0.9rem;
    }

    .cmb-captcha-wrapper {
        flex-direction: row;
        justify-content: flex-start;
    }

    .cmb-captcha-image {
        width: auto !important;
        max-width: 130px !important;
        height: 40px !important;
        max-height: 40px !important;
    }

    .cmb-captcha-refresh {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .cmb-modal-title {
        font-size: 1.375rem;
    }

    .cmb-form {
        gap: 14px;
    }

    .cmb-submit-btn {
        padding: 13px 20px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

.cmb-modal-content::-webkit-scrollbar {
    width: 6px;
}

.cmb-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.cmb-modal-content::-webkit-scrollbar-thumb {
    background: #a88d5e;
    border-radius: 3px;
}

.cmb-modal-content::-webkit-scrollbar-thumb:hover {
    background: #664131;
}

/* ==========================================
   ACCESSIBILITY & PERFORMANCE
   ========================================== */

/* Focus states */
.cmb-input:focus,
.cmb-captcha-refresh:focus,
.cmb-submit-btn:focus,
.cmb-close-btn:focus {
    outline: 3px solid rgba(168, 141, 94, 0.3);
    outline-offset: 2px;
}

/* Smooth animations */
.cmb-modal-content {
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cmb-header-icon,
    .cmb-submit-btn::before,
    #callMeBackModal.fade .modal-dialog {
        animation: none !important;
        transition: none !important;
    }
}
