@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #fafafa;
    line-height: 1.5;
}

/* --- FIX: CORRECTED SELECTOR TO TARGET THE MAIN WRAPPER AND CENTER THE FORM --- */
.ecf-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0.8rem;
    /* Minimal vertical padding */
}

.ecf-container .card-wrapper {
    width: 100%;
    max-width: 960px;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 16px 20px -4px rgba(0, 0, 0, 0.1), 0 6px 8px -5px rgba(0, 0, 0, 0.1);
}

.ecf-container .sidebar {
    background-color: #000;
    color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.ecf-container .sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.1), transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.ecf-container .sidebar-content {
    position: relative;
    z-index: 10;
}

.ecf-container .logo {
    display: flex;
    align-items: center;
    width: 10rem;
    margin-bottom: 1rem;
}

.ecf-container .logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: #fff;
    color: #000;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

/* -- New Style for Custom Logo -- */
.ecf-container .sidebar-logo {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    /* Ensures logo fits without distortion */
    background: none;
    /* Removes any potential background color */
}


.ecf-container .logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.ecf-container .headline {
    margin-bottom: 1.6rem;
}

.ecf-container .headline h1 {
    font-family: 'Space Grotesk', sans-serif;
    /* Added Font */
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    color: #fff;
}

.ecf-container .headline p {
    color: #d4d4d4;
    line-height: 1.6;
    font-size: 0.9em;
}


.ecf-container .benefit-item {
    display: flex;
    gap: 0.6rem;

}

.ecf-container .benefit-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ecf-container .benefit-icon svg {
    width: 1rem;
    height: 1rem;
    stroke: #fff;
}

.ecf-container .benefit-content h3 {
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #fff;
    font-size: 0.9em;
}

.ecf-container .benefit-content p {
    font-size: 0.7rem;
    color: #a3a3a3;
}

.ecf-container .cta-section {
    position: relative;
    z-index: 10;
}

.ecf-container .cta-box {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.6rem;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}

.ecf-container .cta-box p {
    font-size: 0.7rem;
    color: #d4d4d4;
    margin-bottom: 0.6rem;
}

.ecf-container .whatsapp-btn {
    width: 100%;
    background-color: #fff;
    color: #000;
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    /* Reduced vertical padding */
    border: none;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background-color 0.2s;
}

.ecf-container .whatsapp-btn:hover {
    background-color: #f5f5f5;
}

.ecf-container .contact-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    font-size: 0.7rem;
    color: #a3a3a3;
}

.ecf-container .contact-method {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ecf-container .contact-method svg {
    width: 0.8rem;
    height: 0.8rem;
}

.ecf-container .form-section {
    background-color: #fff;
    padding: 2.4rem;
}

.ecf-container .form-container {
    max-width: 512px;
    width: 100%;
    margin: 0 auto;
}

.ecf-container .form-header {
    margin-bottom: 1.6rem;
}

.ecf-container .form-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    /* Added Font */
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #000;
    /* Ensured black color */
}

.ecf-container .form-header p {
    color: #737373;
    font-size: 0.9em;
}

.ecf-container form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* --- FIX: Set 2 columns for all screen sizes by default --- */
.ecf-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.ecf-container .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Make single fields in a row span the full width */
.ecf-container .form-row .form-group:only-child {
    grid-column: span 2 / span 2;
}


.ecf-container label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #000;
    /* Ensured black color */
}

.ecf-container .required {
    color: #dc2626;
}


/* --- FINAL FIX: Force override for all form fields --- */
.ecf-container input,
.ecf-container textarea,
.ecf-container .select-trigger {
    padding: 0 15px !important;
    height: 40px !important;
    border-radius: 7px !important;
    font-size: 0.7rem !important;
    border: 1px solid #e5e5e5 !important;
    background-color: #fff !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    transition: border-color 0.2s;
}

.ecf-container textarea {
    height: auto !important;
    /* Allow textarea to be resizable */
    min-height: 100px !important;
    /* Give it a larger base height */
    padding-top: 15px !important;
    /* Adjust padding for multiline */
}

.ecf-container input:focus,
.ecf-container textarea:focus,
.ecf-container .select-trigger.active {
    outline: none !important;
    border-color: #737373 !important;
}

/* --- END OF FINAL FIX --- */


.ecf-container .custom-select {
    position: relative;
    width: 100%;
}

.ecf-container .select-trigger {
    justify-content: space-between !important;
    user-select: none;
    cursor: pointer;
}

.ecf-container .select-trigger .placeholder {
    color: #a3a3a3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ecf-container .select-trigger .value {
    color: #000;
}

.ecf-container .select-icon {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
}

.ecf-container .select-trigger.active .select-icon {
    transform: translateY(-50%) rotate(180deg);
}

.ecf-container .select-icon svg {
    width: 0.8rem;
    height: 0.8rem;
    color: #737373;
}

.ecf-container .select-dropdown {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    /* Matched radius */
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.1), 0 3px 5px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease-in-out;
}

.ecf-container .select-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ecf-container .select-option {
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 0.7rem;
}

.ecf-container .select-option:hover {
    background-color: #f5f5f5;
}

.ecf-container .select-option.selected {
    background-color: #f5f5f5;
    font-weight: 500;
}

/* --- FIX: Centered submit button text --- */
.ecf-container .submit-btn {
    width: 100%;
    background-color: #000;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 7px;
    /* Matched radius */
    font-size: 0.8rem;
    cursor: pointer;
    height: 40px;
    /* Matched height */
    display: flex;
    /* Added */
    align-items: center;
    /* Added */
    justify-content: center;
    /* Added */
}

.ecf-container .submit-btn:hover {
    background-color: #262626;
}

/* --- RESPONSIVENESS AND CORRECTIONS --- */

@media (min-width: 768px) {

    /* --- FIX: CORRECTED SELECTOR --- */
    .ecf-container {
        padding: 1.6rem;
    }

    .ecf-container .card-wrapper:has(.sidebar) {
        grid-template-columns: 320px 1fr;
    }

    .ecf-container .headline h1 {
        font-size: 1.8rem;
    }
}

/* --- FIX: Tablet-specific size adjustments and text trimming --- */
@media (min-width: 768px) and (max-width: 1024px) {

    .ecf-container .sidebar,
    .ecf-container .form-section {
        padding: 1.5rem;
    }

    .ecf-container .headline h1 {
        font-size: 1.4rem;
    }

    .ecf-container .form-header h2 {
        font-size: 1.3rem;
    }

    .ecf-container form {
        gap: 0.6rem;
    }

    .ecf-container .form-row {
        gap: 0.8rem;
    }

    /* Trimming long text on labels and select options */
    .ecf-container label,
    .ecf-container .select-option,
    .ecf-container .select-trigger span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .ecf-container .card-wrapper:has(.sidebar) {
        grid-template-columns: 384px 1fr;
    }
}

@media (max-width: 767px) {
    .ecf-container .sidebar {
        display: none;
    }

    .ecf-container .card-wrapper {
        grid-template-columns: 1fr;
    }

    .ecf-container .form-section {
        padding: 1.6rem 1.2rem;
    }
}


/* --- PLUGIN FUNCTIONAL STYLES --- */

.ecf-container .ecf-error-message {
    color: #dc2626;
    font-size: 0.6rem;
    margin-top: 0.2rem;
    display: block;
    min-height: 1em;
}

.ecf-container input.invalid-field,
.ecf-container textarea.invalid-field,
.ecf-container .select-trigger.invalid-field {
    border-color: #dc2626 !important;
}

.ecf-container .ecf-message {
    padding: 12px;
    margin-top: 12px;
    border-radius: 7px;
    /* Matched radius */
    border: 1px solid transparent;
    text-align: center;
}

.ecf-container .ecf-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.ecf-container .ecf-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.ecf-container .custom-select.disabled .select-trigger {
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
}

.ecf-container .custom-select.disabled .select-trigger .placeholder {
    color: #999;
}

.ecf-container .ecf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ecf-container .ecf-radio-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.ecf-container .ecf-radio-item label {
    font-weight: 500;
    cursor: pointer;
}

/* --- New Mobile Form Styles --- */
.ecf-container.ecf-mobile-form .form-header h2,
.ecf-container.ecf-mobile-form .headline h1 {
    font-size: 22px;
}

.ecf-container.ecf-mobile-form label,
.ecf-container.ecf-mobile-form p,
.ecf-container.ecf-mobile-form .benefit-content p,
.ecf-container.ecf-mobile-form .cta-box p,
.ecf-container.ecf-mobile-form .contact-methods,
.ecf-container.ecf-mobile-form .select-option,
.ecf-container.ecf-mobile-form .logo-text {
    font-size: 13px;
}

.ecf-container.ecf-mobile-form input,
.ecf-container.ecf-mobile-form textarea,
.ecf-container.ecf-mobile-form .select-trigger {
    font-size: 13px !important;
}


.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    z-index: 1000;
    display: none;
}
