/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* Floating Action Button */
#fef-floating-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.5);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}

#fef-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px -5px rgba(168, 85, 247, 0.6);
}

#fef-floating-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

#fef-floating-btn:hover svg {
    transform: scale(1.1) rotate(-10deg);
}

.fef-pulse {
    animation: fef-pulse-animation 2.5s infinite;
}

@keyframes fef-pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* Modal Overlay */
.fef-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fef-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Container */
.fef-modal-content {
    position: fixed;
    bottom: 110px; /* Above the FAB */
    right: 32px;
    width: 380px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 10001;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.fef-modal-content.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Close Btn */
#fef-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
#fef-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.fef-modal-header {
    margin-bottom: 24px;
}

.fef-modal-header h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.fef-modal-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Form Styles Compact */
.fef-form-group {
    margin-bottom: 16px;
    position: relative;
}

.fef-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    transition: color 0.2s ease;
}

.fef-form-group .req {
    color: #ef4444;
}

.fef-form-input {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.fef-form-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.fef-form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.fef-form-input::placeholder {
    color: #94a3b8;
}

textarea.fef-form-input {
    resize: none;
    min-height: 80px;
}

/* Flex Row for compact Country/Phone */
.fef-row-compact {
    display: flex;
    gap: 12px;
}
.fef-row-compact .fef-form-group {
    flex: 1;
}

#fef-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.39);
    transition: all 0.3s ease;
}

#fef-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

#fef-submit-btn:active {
    transform: translateY(0);
}

#fef-submit-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
#fef-form-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: fef-fade-in 0.3s ease;
}
.fef-msg-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block !important;
}
.fef-msg-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block !important;
}

@keyframes fef-fade-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    #fef-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    .fef-modal-content {
        bottom: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 90vh;
        overflow-y: auto; /* Crucial for scrolling to submit button */
        border-radius: 24px 24px 0 0;
        padding: 24px 20px 40px; /* Extra bottom padding for iOS Safari bar */
        transform-origin: bottom center;
    }
    .fef-row-compact {
        flex-direction: column;
        gap: 0;
    }
}
