/* Elementor Frontend Form Styles for QL Forms */

/* Container - Match builder design, no center alignment */
.elementor-widget-ql-forms .ql-forms-elementor-widget {
    width: 100%;
    text-align: left; /* Explicitly left-aligned */
}

/* Form */
.elementor-widget-ql-forms .ql-form {
    width: 100%;
    max-width: 100%; /* No max-width restriction */
    margin: 0; /* No auto centering */
}

/* Title */
.elementor-widget-ql-forms .ql-form-title {
    margin: 0 0 15px 0;
    padding: 0;
    font-weight: 600;
    text-align: left;
}

/* Description */
.elementor-widget-ql-forms .ql-form-description {
    margin: 0 0 25px 0;
    padding: 0;
    line-height: 1.6;
    text-align: left;
}

/* Fields - Match builder styling exactly */
.elementor-widget-ql-forms .ql-form-field {
    margin-bottom: 20px;
}

.elementor-widget-ql-forms .ql-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
}

.elementor-widget-ql-forms .ql-required {
    color: #e74c3c;
    margin-left: 2px;
}

/* Input Fields - Remove ALL borders, apply only ours */
.elementor-widget-ql-forms .ql-field-input {
    width: 100%;
    border: none !important; /* Remove wrapper border */
    padding: 0 !important; /* Remove wrapper padding */
    margin: 0 !important;
    background: transparent !important;
}

.elementor-widget-ql-forms .ql-field-input input[type="text"],
.elementor-widget-ql-forms .ql-field-input input[type="email"],
.elementor-widget-ql-forms .ql-field-input input[type="number"],
.elementor-widget-ql-forms .ql-field-input input[type="url"],
.elementor-widget-ql-forms .ql-field-input input[type="tel"],
.elementor-widget-ql-forms .ql-field-input input[type="date"],
.elementor-widget-ql-forms .ql-field-input input[type="time"],
.elementor-widget-ql-forms .ql-field-input input[type="datetime-local"],
.elementor-widget-ql-forms .ql-field-input input[type="file"],
.elementor-widget-ql-forms .ql-field-input textarea,
.elementor-widget-ql-forms .ql-field-input select {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #1a1a1a !important;
    background-color: #fff !important;
    border: 1px solid #d0d7de !important; /* Single border only */
    border-radius: 6px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important; /* Remove any Elementor shadows */
    margin: 0 !important;
}

/* Remove Elementor's default input styling */
.elementor-widget-ql-forms .ql-field-input input,
.elementor-widget-ql-forms .ql-field-input textarea,
.elementor-widget-ql-forms .ql-field-input select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.elementor-widget-ql-forms .ql-field-input input:focus,
.elementor-widget-ql-forms .ql-field-input textarea:focus,
.elementor-widget-ql-forms .ql-field-input select:focus {
    border-color: #ff0e56 !important;
    box-shadow: 0 0 0 3px rgba(255, 14, 86, 0.1) !important;
    outline: none !important;
}

.elementor-widget-ql-forms .ql-field-input textarea {
    resize: vertical !important;
    min-height: 100px !important;
}

/* Radio and Checkbox */
.elementor-widget-ql-forms .ql-radio-label,
.elementor-widget-ql-forms .ql-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
}

.elementor-widget-ql-forms .ql-radio-label input[type="radio"],
.elementor-widget-ql-forms .ql-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 8px 0 0 !important;
    flex-shrink: 0;
    cursor: pointer;
}

.elementor-widget-ql-forms .ql-radio-label span,
.elementor-widget-ql-forms .ql-checkbox-label span {
    line-height: 1.5;
}

/* Field Description */
.elementor-widget-ql-forms .ql-field-description {
    margin-top: 6px;
    font-size: 12px;
    color: #57606a;
    line-height: 1.5;
}

/* Submit Button - Match builder button styling */
.elementor-widget-ql-forms .ql-form-submit-wrapper {
    margin-top: 30px;
}

.elementor-widget-ql-forms .ql-submit-button {
    display: inline-block !important;
    padding: 12px 30px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #ff0e56 0%, #e00c4d 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(255, 14, 86, 0.2) !important;
}

.elementor-widget-ql-forms .ql-submit-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 14, 86, 0.3) !important;
}

.elementor-widget-ql-forms .ql-submit-button:active {
    transform: translateY(0) !important;
}

/* Messages */
.elementor-widget-ql-forms .ql-form-success {
    padding: 15px 20px;
    margin-bottom: 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 6px;
    font-size: 14px;
}

.elementor-widget-ql-forms .ql-form-error {
    padding: 15px 20px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 6px;
    font-size: 14px;
}

/* Loading Spinner */
.elementor-widget-ql-forms .ql-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ql-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes ql-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .elementor-widget-ql-forms .ql-form-title {
        font-size: 24px;
    }
    
    .elementor-widget-ql-forms .ql-submit-button {
        width: 100%;
    }
    
    .elementor-widget-ql-forms .ql-field-input input,
    .elementor-widget-ql-forms .ql-field-input textarea,
    .elementor-widget-ql-forms .ql-field-input select {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}
