/* Modern Animal Registration Form Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #6eaee2 0%, #406a92 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.header-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    
    padding: 8px;
    
}

.header-logo-right {
    width: 250px !important;
    height: auto !important;
}


.header-text {
    text-align: left;
}

.header-text h1 {
    font-size: 2.5rem;
    margin: 0 0 8px 0;
    font-weight: 300;
}

.header-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
    text-align: center;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
    }
    
    .header-text {
        text-align: left;
    }
    
    .header-text p {
        text-align: center;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
    }
    
    .header-logo-right {
        width: 200px !important;
        height: auto !important;
    }
    
    .header-text h1 {
        font-size: 1.8rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-text {
        text-align: center;
    }
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #1565C0;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: auto;
    transform: scale(1.2);
}

.radio-label span {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + span {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

input[type="file"] {
    padding: 10px;
    border: 2px dashed #e1e8ed;
    background: #f8f9fa;
    cursor: pointer;
    min-height: 44px; /* Minimum touch target size for mobile */
    font-size: 16px; /* Prevents zoom on iOS */
}

input[type="file"]:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

/* Mobile-specific file input styling */
@media (max-width: 768px) {
    input[type="file"] {
        padding: 15px;
        min-height: 50px;
        font-size: 16px;
        background: #fff;
        border: 2px solid #2196F3;
        border-radius: 8px;
        color: #2196F3;
        font-weight: 500;
        position: relative;
    }
    
    input[type="file"]:active {
        background: #e3f2fd;
        transform: scale(0.98);
    }
    
    /* Improve touch targets on mobile */
    .form-group input[type="file"] {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(33, 150, 243, 0.3);
    }
    
    /* File info display on mobile */
    .file-info {
        background: #e8f5e8;
        border: 1px solid #4CAF50;
        border-radius: 4px;
        padding: 8px 12px;
        margin-top: 8px;
        font-size: 0.9rem;
        color: #2e7d32;
        word-break: break-word;
    }
    
    /* Add visual indicator for file inputs */
    .form-group input[type="file"] {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%232196F3'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 20px;
        padding-right: 50px;
    }
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9rem;
}

small a {
    color: #4CAF50;
    text-decoration: none;
}

small a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.btn-submit,
.btn-reset {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-reset {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e8ed;
}

.btn-reset:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    form {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-submit,
    .btn-reset {
        width: 100%;
        max-width: 300px;
    }
    
    .requirements-link {
        margin: 15px 20px;
        padding: 15px;
    }
    
    .requirements-link p {
        font-size: 1rem;
    }
}

/* Loading and Success States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
    display: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    display: none;
}

/* Form validation styles */
.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.error label {
    color: #dc3545;
}

.error-text {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* File upload styling */
.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.file-upload-label:hover {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
    color: #4CAF50;
}

.file-upload.has-file .file-upload-label {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

/* Consent section styling */
.consent-section {
    background: #f8f9fa;
    border: 2px solid #2196F3;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.consent-text {
    margin-bottom: 20px;
    line-height: 1.6;
}

.consent-text h4 {
    color: #2196F3;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.consent-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.consent-text li {
    margin: 5px 0;
}

.consent-checkbox {
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 6px;
    padding: 15px;
    position: relative;
}

.consent-checkbox::before {
    content: "⚠️ OBRIGATÓRIO";
    position: absolute;
    top: -12px;
    left: 15px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #2196F3;
}

.consent-label {
    font-size: 0.95em;
    line-height: 1.4;
    color: #333;
}

.consent-label strong {
    color: #dc3545;
    font-weight: bold;
}

/* Error styling for consent */
.checkbox-container.error .checkmark {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.consent-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

/* Requirements link styling */
.requirements-link {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.requirements-link p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #856404;
}

.requirements-link a {
    color: #1976D2;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.requirements-link a:hover {
    color: #1565C0;
    border-bottom-color: #1976D2;
    transform: translateY(-1px);
}

/* Form inputs with uppercase transformation */
.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    text-transform: uppercase;
}

/* Specific fields that should NOT be uppercase */
.form-group input[type="email"],
.form-group input[name="email_tutor"] {
    text-transform: none;
}

/* CPF and phone fields formatting */
.form-group input[name="cpf_tutor"],
.form-group input[name="telefone_tutor"] {
    text-transform: none;
}

/* Numeric fields should not be uppercase */
.form-group input[type="number"],
.form-group input[name="idade_animal"],
.form-group input[name="numero_casa"] {
    text-transform: none;
}
