/* Float button styling (floating-btn) */
.floating-btn {
    background-color: #C10007;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(193, 0, 7, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: fixed;
    opacity: 0;
    /* Start hidden */
    pointer-events: none;
    /* Initially not clickable */
}

.floating-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.floating-btn:hover {
    background-color: #82181A;
    box-shadow: 0 12px 24px rgba(130, 24, 26, 0.4);
    transform: scale(1.05);
}

/* Desktop positioning with vertical text */
@media screen and (min-width: 769px) {
    .floating-btn {
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        padding: 22px 12px;
        border-radius: 8px 0px 0px 8px; /* Corrected to left side rounded because it sits on the right screen edge */
        writing-mode: vertical-lr;
        text-orientation: mixed;
        display: flex;
        align-items: center;
        letter-spacing: 0.05em;
    }

    .floating-btn svg {
        margin-top: 10px;
        width: 16px;
        height: 16px;
        transform: rotate(180deg);
    }
}

/* Mobile positioning */
@media screen and (max-width: 768px) {
    .floating-btn {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        justify-content: center;
        padding: 14px 24px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        box-shadow: 0 8px 24px rgba(193, 0, 7, 0.3);
    }

    .floating-btn svg {
        margin-right: 8px;
        width: 18px;
        height: 18px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Modern slate backdrop overlay */
    backdrop-filter: blur(8px); /* Blur effect matching header */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-container {
    background-color: white;
    width: 90%;
    max-width: 480px;
    border-radius: 24px; /* Premium smooth corners */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1E293B;
    font-weight: 700;
}

.modal-close {
    background: #F1F5F9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64748B;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* Form inputs & general fields */
.form-group1 {
    margin-bottom: 14px;
}

label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    margin-top: 10px;
    text-align: left;
}

.textinput,
.selectinput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #CBD5E1;
    border-radius: 12px; /* Consistent rounded inputs */
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1E293B;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
    display: block;
}

.textinput::placeholder {
    color: #94A3B8;
}

.textinput:focus,
.selectinput:focus {
    border-color: #C10007;
    box-shadow: 0 0 0 4px rgba(193, 0, 7, 0.15);
    outline: none;
}

/* Inline form adjustment for spacing */
#myForm .textinput,
#myForm .selectinput {
    margin-bottom: 12px;
}

#myForm br {
    display: none; /* Hide manual br tags to let layout flow via CSS margins */
}

/* Security Notice */
.security-notice {
    background-color: #FFFBEB;
    border: 1px solid #FEF3C7;
    text-align: center;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 18px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.security-notice span {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #B45309;
    font-weight: 500;
}

.security-notice span i {
    color: #D97706;
}

/* Submit Buttons */
#leadform,
#leadform1 {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #C10007 0%, #82181A 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(193, 0, 7, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-align: center;
}

#leadform:hover,
#leadform1:hover {
    box-shadow: 0 6px 20px rgba(193, 0, 7, 0.35);
    filter: brightness(1.1);
}

#leadform:active,
#leadform1:active {
    transform: scale(0.98);
}

/* Disabled State */
#leadform:disabled,
#leadform1:disabled {
    background: #CBD5E1;
    color: #64748B;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-container {
        width: 92%;
        padding: 24px;
        border-radius: 20px;
    }

    .modal-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .textinput,
    .selectinput,
    #leadform,
    #leadform1 {
        padding: 11px 14px;
        font-size: 14px;
    }

    .modal-container {
        padding: 20px;
    }
}