/* 
Canal de Denúncias - Cordenonsi Transportes
Paleta de cores baseada na identidade visual da empresa
*/

:root {
    /* Cores principais Cordenonsi */
    --primary-color: #0750F7;      /* Azul escuro corporativo */
    --secondary-color: #0066CC;    /* Azul médio */
    --light-blue: #5AEDF7;         /* Azul claro corporativo */
    --accent-color: #FF6B00;       /* Laranja de destaque */
    --success-color: #28a745;      /* Verde sucesso */
    --warning-color: #ffc107;      /* Amarelo aviso */
    --danger-color: #dc3545;       /* Vermelho erro */
    
    /* Cores neutras */
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --white: #ffffff;
    
    /* Tipografia */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background: linear-gradient(135deg, var(--light-gray) 0%, #e3f2fd 100%);
    min-height: 100vh;
}

/* Container principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(7, 80, 247, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.logo {
    max-height: 60px;
    max-width: 250px;
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
    /* Força a logo a ficar branca */
    filter: brightness(0) invert(1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
    color: var(--light-blue);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(7, 80, 247, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7, 80, 247, 0.3);
    color: var(--white);
    text-decoration: none;
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #e55a00;
    transform: translateY(-2px);
    color: var(--white);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--white);
    text-decoration: none;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: var(--font-weight-medium);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 80, 247, 0.1);
}

/* Radio buttons customizados */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-item:hover {
    border-color: var(--primary-color);
    background: rgba(7, 80, 247, 0.05);
}

.radio-item input[type="radio"] {
    margin-right: 1rem;
}

.radio-item.selected {
    border-color: var(--primary-color);
    background: rgba(7, 80, 247, 0.1);
}

/* Tooltips */
.tooltip-icon {
    color: var(--primary-color);
    margin-left: 0.5rem;
    cursor: help;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.tooltip-icon:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.tooltip-icon:active {
    transform: scale(0.95);
}

/* Container do tooltip */
.custom-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 350px;
    min-width: 200px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.custom-tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

.custom-tooltip .tooltip-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Setas do tooltip baseadas na posição */
.custom-tooltip[data-position="top"]::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #333;
}

.custom-tooltip[data-position="bottom"]::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #333;
}

.custom-tooltip[data-position="left"]::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #333;
}

.custom-tooltip[data-position="right"]::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #333;
}

/* Botão de fechar tooltip no mobile */
.custom-tooltip .tooltip-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: none;
}

.custom-tooltip .tooltip-close:hover {
    opacity: 1;
}

/* Backdrop para mobile */
.tooltip-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip-backdrop.show {
    display: block;
    opacity: 1;
}

/* Checkbox de termos */
.terms-checkbox {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: rgba(7, 80, 247, 0.05);
    border-radius: 8px;
    margin: 2rem 0;
}

.terms-checkbox input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.terms-checkbox label {
    margin: 0;
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.left-actions {
    display: flex;
    gap: 1rem;
}

.right-actions {
    display: flex;
    gap: 1rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-radius: 20px 20px 0 0;
}

.footer-logo {
    max-height: 70px;
    max-width: 270px;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Força a logo a ficar branca também - melhor contraste */
    filter: brightness(0) invert(1);
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    color: #155724;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger-color);
    color: #721c24;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .logo {
        max-height: 45px;
        max-width: 180px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.95rem;
    }
    
    .footer-logo {
        max-height: 50px;
        max-width: 200px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .left-actions,
    .right-actions {
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    /* Tooltips no mobile */
    .custom-tooltip {
        position: fixed !important;
        max-width: 90%;
        max-height: 70vh;
        width: auto;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        padding: 20px 40px 20px 20px;
        font-size: 15px;
    }
    
    .custom-tooltip.show {
        transform: translate(-50%, -50%) !important;
    }
    
    .custom-tooltip::after {
        display: none !important;
    }
    
    .custom-tooltip .tooltip-content {
        max-height: calc(70vh - 40px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .custom-tooltip .tooltip-close {
        display: block;
    }
    
    .tooltip-icon {
        font-size: 1.4rem;
        padding: 8px;
        margin-left: 0.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
    }
    
    .radio-item label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Estados desabilitados */
.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* Upload de arquivos */
.file-upload {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: rgba(7, 80, 247, 0.05);
    transition: all 0.3s ease;
}

.file-upload:hover {
    background: rgba(7, 80, 247, 0.1);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
}

/* Protocolo display */
.protocol-display {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* Cores personalizadas para ícones */
.text-dark-blue {
    color: var(--primary-color) !important;
}

.text-light-blue {
    color: var(--light-blue) !important;
}

/* Sobrescrever cores do Bootstrap */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--primary-color) !important;
}

.text-info {
    color: var(--primary-color) !important;
}
