/**
 * Rocha Andrade Formulário - Estilos
 *
 * @package Rocha_Andrade_Formulario
 */

/* Reset e Container */
.rocha-form-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 40px !important;
    box-sizing: border-box !important;
    font-family: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #333 !important;
    background-color: transparent !important;
}

.rocha-form-container * {
    box-sizing: border-box !important;
}

.rocha-form {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* Grupos de Formulário */
.rocha-form-group {
    margin-bottom: 24px !important;
    width: 100% !important;
}

.rocha-form-row {
    display: flex !important;
    gap: 24px !important;
    margin-bottom: 24px !important;
    flex-wrap: wrap !important;
}

.rocha-form-row .rocha-form-group {
    flex: 1 !important;
    min-width: 200px !important;
    margin-bottom: 0 !important;
}

/* Labels */
.rocha-form-container label {
    display: block !important;
    font-size: 14px !important;
    color: #333 !important;
    margin-bottom: 8px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
}

/* Inputs */
.rocha-form-container input[type="text"],
.rocha-form-container input[type="email"],
.rocha-form-container input[type="tel"],
.rocha-form-container input[type="url"],
.rocha-form-container select,
.rocha-form-container textarea {
    width: 100% !important;
    padding: 12px 0 !important;
    font-size: 16px !important;
    font-family: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
    border: none !important;
    border-bottom: 1px solid #333 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: #999 !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease !important;
    height: auto !important;
    min-height: auto !important;
}

.rocha-form-container input[type="text"]:focus,
.rocha-form-container input[type="email"]:focus,
.rocha-form-container input[type="tel"]:focus,
.rocha-form-container input[type="url"]:focus,
.rocha-form-container select:focus,
.rocha-form-container textarea:focus {
    border-bottom-color: #333 !important;
    outline: none !important;
    box-shadow: none !important;
}

.rocha-form-container input::placeholder,
.rocha-form-container textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Textarea */
.rocha-form-container textarea {
    resize: vertical !important;
    min-height: 100px !important;
    padding: 12px 0 !important;
}

/* Select Wrapper */
.rocha-select-wrapper {
    position: relative !important;
    width: 100% !important;
}

.rocha-select-wrapper::after {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 5px solid #333 !important;
    pointer-events: none !important;
}

.rocha-form-container select {
    cursor: pointer !important;
    padding-right: 20px !important;
}

/* File Input Wrapper */
.rocha-file-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #333 !important;
    flex-wrap: wrap !important;
}

.rocha-file-wrapper input[type="file"] {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
}

.rocha-file-label {
    display: inline-block !important;
    padding: 8px 16px !important;
    background-color: #333 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap !important;
}

.rocha-file-label:hover {
    background-color: #555 !important;
}

.rocha-file-name {
    font-size: 14px !important;
    color: #999 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 300px !important;
}

/* Checkbox Group */
.rocha-checkbox-group {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    margin-top: 32px !important;
}

.rocha-checkbox-group input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    accent-color: #333 !important;
    flex-shrink: 0 !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
}

.rocha-checkbox-group label {
    font-size: 13px !important;
    color: #666 !important;
    margin-bottom: 0 !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}

/* Submit Button */
.rocha-submit-btn {
    background: none !important;
    border: none !important;
    font-family: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #333 !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: opacity 0.3s ease !important;
    box-shadow: none !important;
    outline: none !important;
    display: inline-block !important;
    line-height: 1.4 !important;
}

.rocha-submit-btn:hover {
    opacity: 0.7 !important;
    background: none !important;
    border: none !important;
    color: #333 !important;
}

.rocha-submit-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.rocha-submit-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Campos Dinâmicos */
.rocha-campos-dinamicos {
    animation: rochaFadeIn 0.3s ease !important;
}

@keyframes rochaFadeIn {
    from {
        opacity: 0 !important;
        transform: translateY(-10px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Mensagens de Feedback */
.rocha-form-messages {
    margin-top: 20px !important;
    padding: 0 !important;
}

.rocha-form-messages.rocha-success {
    padding: 15px !important;
    background-color: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
    border-radius: 0 !important;
}

.rocha-form-messages.rocha-error {
    padding: 15px !important;
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    border-radius: 0 !important;
}

/* Loading State */
.rocha-form-loading {
    position: relative !important;
    pointer-events: none !important;
}

.rocha-form-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10 !important;
}

.rocha-form-loading .rocha-submit-btn::after {
    content: 'Enviando...' !important;
    position: absolute !important;
    left: 0 !important;
}

/* Campo inválido */
.rocha-form-container input.rocha-invalid,
.rocha-form-container select.rocha-invalid,
.rocha-form-container textarea.rocha-invalid {
    border-bottom-color: #dc3232 !important;
}

.rocha-form-container .rocha-file-wrapper.rocha-invalid {
    border-bottom-color: #dc3232 !important;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .rocha-form-container {
        padding: 20px !important;
    }

    .rocha-form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .rocha-form-row .rocha-form-group {
        margin-bottom: 24px !important;
        min-width: 100% !important;
    }

    .rocha-file-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .rocha-file-name {
        max-width: 100% !important;
    }
}
