/* 
 * Portal do Titular - Estilos Específicos
 * Sistema LGPD - Prefeitura de Rio Claro RJ
 * 
 * @author Sistema LGPD
 * @version 1.0.0
 * @date 2025-11-19
 */

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-illustration {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===== CARDS DE DIREITOS ===== */
.direitos-section .card {
    border: none;
    transition: all 0.3s ease;
    height: 100%;
}

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

.direitos-section .card .bi {
    transition: all 0.3s ease;
}

.direitos-section .card:hover .bi {
    transform: scale(1.1);
}

.direitos-section .card-title {
    color: #2c3e50;
    font-size: 1.2rem;
}

.direitos-section .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
}

/* ===== ÍCONES ESPECÍFICOS POR TIPO ===== */
.card .bi-search {
    color: #007bff !important;
}

.card .bi-eye {
    color: #28a745 !important;
}

.card .bi-pencil-square {
    color: #ffc107 !important;
}

.card .bi-trash {
    color: #dc3545 !important;
}

.card .bi-download {
    color: #17a2b8 !important;
}

.card .bi-x-circle {
    color: #6c757d !important;
}

/* ===== FORMULÁRIO DE ACOMPANHAMENTO ===== */
.acompanhar-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.acompanhar-section .card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#protocolo {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#protocolo::placeholder {
    font-family: inherit;
    font-weight: normal;
    letter-spacing: normal;
    text-transform: none;
    opacity: 0.7;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-nova {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.status-em-analise {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #e65100;
}

.status-respondida {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.status-rejeitada {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

.status-prorrogada {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #ad1457;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #007bff 0%, #6c757d 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 4rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: #007bff;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #007bff;
}

.timeline-item.completed::before {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.timeline-item.current::before {
    background: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 2px #ffc107;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 2px #ffc107;
    }
}

.timeline-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.timeline-date {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.timeline-title {
    color: #2c3e50;
    font-weight: 600;
    margin: 0.5rem 0;
}

.timeline-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== SEÇÃO DPO ===== */
.dpo-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    position: relative;
}

.dpo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M20 20c0 4.4-3.6 8-8 8s-8-3.6-8-8 3.6-8 8-8 8 3.6 8 8zm12-12c0 4.4-3.6 8-8 8s-8-3.6-8-8 3.6-8 8-8 8 3.6 8 8z'/%3E%3C/g%3E%3C/svg%3E") repeat;
}

.dpo-section .container {
    position: relative;
    z-index: 1;
}

.dpo-section .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    border: none;
    color: #000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dpo-section .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.dpo-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== INDICADORES DE PRAZO ===== */
.prazo-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.prazo-normal {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.prazo-atencao {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #e65100;
}

.prazo-vencido {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

/* ===== LOADING STATES ===== */
.loading-card {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== TOOLTIPS CUSTOMIZADOS ===== */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

/* ===== RESPONSIVIDADE ESPECÍFICA ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-section .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        padding-left: 2.5rem;
    }
    
    .timeline-item::before {
        left: 0.75rem;
    }
    
    .dpo-section .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .direitos-section .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .acompanhar-section .card-body {
        padding: 2rem 1.5rem;
    }
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Delay para animações sequenciais */
.animation-delay-1 { animation-delay: 0.1s; }
.animation-delay-2 { animation-delay: 0.2s; }
.animation-delay-3 { animation-delay: 0.3s; }
.animation-delay-4 { animation-delay: 0.4s; }
.animation-delay-5 { animation-delay: 0.5s; }
.animation-delay-6 { animation-delay: 0.6s; }

/* ============================================================
   Timeline para histórico de solicitações
============================================================ */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 25px;
}

.timeline-marker {
    position: absolute;
    left: -21px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.timeline-content strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* ============================================================
   Status badges customizados
============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge i {
    font-size: 1.2em;
}

/* ============================================================
   Cards de consulta
============================================================ */
.consulta-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.consulta-card .card-header {
    border-bottom: none;
    font-weight: 600;
}

/* ============================================================
   Prazo de resposta styling
============================================================ */
.prazo-vencido {
    color: #dc3545;
    font-weight: bold;
}

.prazo-atencao {
    color: #ffc107;
    font-weight: bold;
}

.prazo-ok {
    color: #28a745;
    font-weight: bold;
}

/* ============================================================
   Loading spinner personalizado
============================================================ */
.custom-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* ============================================================
   Comunicações styling
============================================================ */
.comunicacao-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 15px;
}

.comunicacao-item.email {
    border-left-color: #17a2b8;
}

.comunicacao-item.sms {
    border-left-color: #ffc107;
}

.comunicacao-item.sistema {
    border-left-color: #6f42c1;
}

/* ============================================================
   Documentos anexos
============================================================ */
.documento-anexo {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.documento-anexo i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* ============================================================
   Resposta oficial styling
============================================================ */
.resposta-oficial {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.resposta-oficial::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -10px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 1.2em;
}