/* ========================================
   ARQUIVO CSS - FORMULÁRIO OUVIDORIA UNIMED CEARÁ
   Versão: 2.0 | Standalone
   ======================================== */

/* ===== ESTILOS GERAIS ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container-ouvidoria {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER ===== */
.header-ouvidoria {
    background: linear-gradient(135deg, #00995d, #007a4a);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.header-ouvidoria::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-ouvidoria h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.header-ouvidoria p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* ===== CONTAINER DO FORMULÁRIO ===== */
.form-container {
    padding: 35px;
}

/* ===== SEÇÃO TIPO DE CLIENTE ===== */
.tipo-cliente-section {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
    border-left: 5px solid #00995d;
    border: 1px solid rgba(0, 153, 93, 0.1);
}

.tipo-cliente-section h4 {
    color: #00995d;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: white;
}

.radio-item:hover {
    background-color: rgba(0, 153, 93, 0.05);
    border-color: rgba(0, 153, 93, 0.2);
    transform: translateY(-2px);
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #00995d;
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    margin: 0;
}

.radio-item strong {
    color: #00995d;
    font-size: 16px;
}

.radio-item small {
    color: #666;
    font-size: 14px;
}

/* ===== SEÇÕES DO FORMULÁRIO ===== */
.form-section {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CAMPO DE CARTÃO ===== */
.campo-cartao {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.campo-cartao > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.campo-cartao input {
    text-align: center;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.campo-cartao small {
    margin-top: 5px;
    font-weight: 600;
    color: #00995d;
}

/* ===== CAMPO UNIMED (NÃO CLIENTES) ===== */
.campo-unimed-solicitacao {
    display: none;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffeb3b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.campo-unimed-solicitacao::before {
    content: '⚠️';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #fff3cd;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 18px;
}

.campo-unimed-solicitacao.show {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* ===== LABELS DO FORMULÁRIO ===== */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
}

/* ===== CONTROLES DO FORMULÁRIO ===== */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #00995d;
    box-shadow: 0 0 0 0.25rem rgba(0, 153, 93, 0.15);
    outline: none;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 0.8;
    cursor: not-allowed;
}

/* ===== BOTÕES ===== */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #00995d, #007a4a);
    border: none;
    color: white;
    padding: 15px 35px;
    font-size: 16px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 153, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 153, 93, 0.4);
    background: linear-gradient(135deg, #007a4a, #00995d);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline-danger {
    border: 2px solid #e74c3c;
    color: #e74c3c;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
}

/* ===== SISTEMA DE ANEXOS ===== */
.anexo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.btn-adicionar-anexo {
    background: none;
    border: 3px dashed #00995d;
    color: #00995d;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-adicionar-anexo:hover {
    background: #00995d;
    color: white;
    border-style: solid;
    transform: translateY(-2px);
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 5px solid #ffc107;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00995d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CARDS ===== */
.card {
    border: 1px solid rgba(0, 153, 93, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    border-radius: 12px 12px 0 0;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 153, 93, 0.1);
}

.card-body {
    padding: 25px;
}

.border-success {
    border-color: #00995d !important;
}

.bg-success {
    background: linear-gradient(135deg, #00995d, #007a4a) !important;
}

/* ===== VALIDAÇÃO DE CAMPOS ===== */
.form-control.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.15);
}

.form-control.is-valid {
    border-color: #00995d;
    box-shadow: 0 0 0 0.25rem rgba(0, 153, 93, 0.15);
}

/* ===== INPUT GROUPS ===== */
.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ===== TEXTAREA ===== */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* ===== CONTADOR DE CARACTERES ===== */
.form-text {
    font-size: 0.875em;
    margin-top: 0.5rem;
    font-weight: 500;
}

.text-warning {
    color: #f39c12 !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-muted {
    color: #6c757d !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        padding: 25px 20px;
    }
    
    .header-ouvidoria h1 {
        font-size: 24px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .campo-cartao {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .campo-cartao > div {
        align-items: stretch;
    }
    
    .campo-cartao input {
        width: 100%;
        max-width: none;
    }
    
    .anexo-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .btn-primary {
        padding: 12px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container-ouvidoria {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    
    body {
        padding: 0;
    }
    
    .header-ouvidoria {
        border-radius: 0;
    }
    
    .form-container {
        padding: 20px 15px;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== DARK MODE (OPCIONAL) ===== */
/* @media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .container-ouvidoria {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .form-control,
    .form-select {
        background-color: #2c3e50;
        border-color: #4a5568;
        color: #ecf0f1;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #2c3e50;
        border-color: #00995d;
    }
} */

/* ===== PRINT STYLES ===== */
@media print {
    .loading-overlay,
    .btn,
    .anexo-item button {
        display: none !important;
    }
    
    .container-ouvidoria {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .header-ouvidoria {
        background: #00995d !important;
        color: white !important;
    }
}