/* ==========================================================================
   ARKESH Technology — Contact Us Popup Modal & Floating Trigger Styles
   ========================================================================== */

/* 1. Floating Trigger Button (Bottom-Left) */
.contact-popup-trigger-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 99999999;
    background: linear-gradient(135deg, #071739 0%, #0A4D9D 60%, #00B8D9 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 24px rgba(7, 23, 57, 0.35), 0 2px 8px rgba(0, 184, 217, 0.3);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    outline: none;
    font-family: inherit;
    text-decoration: none;
}

.contact-popup-trigger-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 30px rgba(7, 23, 57, 0.45), 0 4px 15px rgba(0, 184, 217, 0.5);
    color: #ffffff;
}

.contact-popup-trigger-btn .trigger-icon-pulse {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #00B8D9;
    font-size: 15px;
}

.contact-popup-trigger-btn .trigger-badge {
    background: #22c55e;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    box-shadow: 0 0 6px #22c55e;
}

/* 2. Modal Overlay Backdrop */
.contact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 23, 57, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.contact-popup-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
}

/* 3. Modal Card Container */
.contact-popup-modal {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: inherit;
    box-sizing: border-box;
    z-index: 2147483647 !important;
}

.contact-popup-overlay.active .contact-popup-modal {
    transform: scale(1) translateY(0) !important;
}

/* 4. Modal Header */
.contact-popup-header {
    background: linear-gradient(135deg, #071739 0%, #0A4D9D 100%);
    padding: 18px 22px 16px;
    color: #ffffff;
    position: relative;
    border-bottom: 2px solid #00B8D9;
}

.contact-popup-header .header-tag {
    font-size: 11px;
    font-weight: 800;
    color: #00B8D9;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.contact-popup-header .header-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.contact-popup-header .header-subtitle {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

.contact-popup-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

.contact-popup-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

/* 5. Modal Body & Form Elements */
.contact-popup-body {
    padding: 18px 22px 20px;
    overflow-y: auto;
    background: #ffffff;
    flex: 1;
}

.contact-popup-form .popup-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 11px;
}

.contact-popup-form .popup-form-col {
    flex: 1;
    min-width: 0;
}

.contact-popup-form .popup-form-group {
    margin-bottom: 11px;
}

.contact-popup-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
    line-height: 1.3;
}

.contact-popup-form label .req {
    color: #ef4444;
    font-weight: 800;
}

.contact-popup-form input.popup-input,
.contact-popup-form select.popup-select,
.contact-popup-form textarea.popup-textarea {
    width: 100%;
    height: 38px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    display: block;
}

.contact-popup-form select.popup-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
    appearance: none;
    -webkit-appearance: none;
}

.contact-popup-form textarea.popup-textarea {
    height: 58px;
    resize: none;
    padding: 8px 12px;
    line-height: 1.4;
}

.contact-popup-form input.popup-input:focus,
.contact-popup-form select.popup-select:focus,
.contact-popup-form textarea.popup-textarea:focus {
    border-color: #00B8D9;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 184, 217, 0.16);
}

.contact-popup-form .popup-submit-btn {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0A4D9D 0%, #00B8D9 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(10, 77, 157, 0.35);
    transition: all 0.25s ease;
    margin-top: 6px;
    outline: none;
    font-family: inherit;
}

.contact-popup-form .popup-submit-btn:hover {
    background: linear-gradient(135deg, #083c7d 0%, #009ebc 100%);
    box-shadow: 0 6px 20px rgba(0, 184, 217, 0.45);
    transform: translateY(-1px);
}

.contact-popup-form .popup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-popup-footer-note {
    text-align: center;
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 6. Success & Error States */
.contact-popup-status {
    text-align: center;
    padding: 30px 10px;
    display: none;
}

.contact-popup-status.active {
    display: block;
    animation: popupFadeIn 0.3s ease;
}

.contact-popup-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 14px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

.contact-popup-status-icon.error {
    background: #fef2f2;
    color: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25);
}

.contact-popup-status-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.contact-popup-status-text {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

.contact-popup-status-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 6px;
    background: #0A4D9D;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-popup-status-btn:hover {
    background: #083c7d;
}

/* Spinner */
.popup-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: popupSpin 0.8s linear infinite;
}

@keyframes popupSpin {
    to { transform: rotate(360deg); }
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 575px) {
    .contact-popup-trigger-btn {
        bottom: 18px;
        left: 15px;
        padding: 8px 14px;
        font-size: 12.5px;
    }
    .contact-popup-form .popup-form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }
    .contact-popup-form .popup-form-row .popup-form-col {
        margin-bottom: 10px;
    }
    .contact-popup-header {
        padding: 15px 18px;
    }
    .contact-popup-body {
        padding: 15px 18px;
    }
    .contact-popup-header .header-title {
        font-size: 17px;
    }
}
