body {
    justify-content: start;
    padding-top: 0;
}

.contact-form-container {
    width: 600px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
}

.site-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.site-logo img {
    max-height: 80px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.contact-form-container h3 {
    color: #6b7280;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2.5rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}


.contact-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.success-message {
    color: #22c55e;
    font-weight: 800;
    text-align: center;
    margin-top: 1rem !important;
}

.error-message {
    color: #ef4444;
    font-weight: 800;
    text-align: center;
    margin-top: 1rem !important;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-field {
    flex: 1;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    display: none; 
}

.form-field input,
.form-field select {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #9ca3af;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

.form-field input::placeholder {
    color: #9ca3af;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    color: #374151;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 2.5rem;
}

#id_localidad:disabled,
#id_localidad[disabled],
#id_localidad_select:disabled,
#id_localidad_select[disabled] {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-field select option[value=""]:not(:checked) {
    display: none;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: left;
}

.submit-button {
    background-color: rgba(51, 121, 246, 1);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
    background-color: rgba(51, 121, 246, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(51, 121, 246, 0.3);
}

.submit-button:disabled {
    background-color: rgba(51, 121, 246, 0.7);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* HTMX indicator styles */
.htmx-indicator {
    display: none;
    align-items: center;
    gap: 8px;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
}

.htmx-request .btn-text {
    display: none;
}

/* Spinner animation */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .contact-form-container {
        margin: 1.5rem;
        padding: 2rem 1.5rem;
    }
    
    .contact-form-container h3 {
        font-size: 1.25rem;
    }
    
    .site-logo img {
        max-height: 60px;
        max-width: 150px;
    }
}