/* ============================================
   CONECTECIDADE - PUBLIC APP STYLES
   ============================================ */

:root {
    --primary-color: #004547;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: var(--white);
}

/* ============================================
   BOOTSTRAP OVERRIDES
   ============================================ */

.text-primary {
    color: #004547 !important;
}

.bg-primary {
    background-color: #004547 !important;
}

.btn-primary {
    background-color: #004547 !important;
    border-color: #004547 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #003335 !important;
    border-color: #003335 !important;
}

.border-primary {
    border-color: #004547 !important;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand i {
    font-size: 1.8rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.hero-section .btn-light {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.5rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 69, 71, 0.15);
}

textarea.form-control {
    resize: vertical;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background-color: #003335;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 69, 71, 0.3);
}

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

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    scroll-margin-top: 70px;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* ============================================
   BADGES & STATUS
   ============================================ */

.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 20px;
}

.status-aberto {
    background-color: var(--warning);
    color: white;
}

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

.status-concluido {
    background-color: var(--success);
    color: white;
}

/* ============================================
   TICKET TRACKING
   ============================================ */

.ticket-timeline {
    position: relative;
    padding-left: 30px;
}

.ticket-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
}

.ticket-timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.ticket-timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

/* ============================================
   RATING SECTION
   ============================================ */

#rating-section {
    background-color: #f0f9ff;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.rating-stars {
    font-size: 2rem;
    color: #fbbf24;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

#loading {
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-radius: 15px 15px 0 0;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    margin-top: 3rem;
}

footer p {
    font-size: 1rem;
}

/* ============================================
   QUESTIONNAIRE
   ============================================ */

.questionnaire-item {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.questionnaire-item h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ============================================
   MEDIA PREVIEWS
   ============================================ */

.media-preview {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-md-flex .btn {
        width: auto;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    h5 {
        font-size: 1.1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.card {
    animation: fadeIn 0.5s ease-in-out;
}

/* ============================================
   UTILITIES
   ============================================ */

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

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   TICKET CARDS - MY TICKETS PAGE
   ============================================ */

.ticket-card {
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.ticket-card .card-title {
    color: var(--dark-color);
    font-size: 1.1rem;
}

.ticket-card .badge {
    padding: 0.5rem 0.8rem;
    font-weight: 600;
}

.responses-section {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.responses-list {
    max-height: 200px;
    overflow-y: auto;
}

.response-item {
    background-color: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.response-item:last-child {
    margin-bottom: 0;
}

.ticket-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid #e2e8f0;
}

.ticket-image:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.images-preview {
    display: flex;
    flex-wrap: wrap;
}

/* ============================================
   IMAGE MODAL
   ============================================ */

.image-modal {
    display: flex;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   AUTH MODAL
   ============================================ */

#authModal .modal-content {
    border-radius: 15px;
    border: none;
}

#authModal .modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

#authModal .modal-body {
    padding: 2rem;
}

#authModal .form-control {
    padding: 0.75rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s;
}

#authModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#authModal .btn {
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

#authModal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .ticket-card .card-body {
        padding: 1rem;
    }
    
    .ticket-card .card-title {
        font-size: 1rem;
    }
    
    .ticket-image {
        width: 80px;
        height: 80px;
    }
    
    .image-modal-content {
        max-width: 95%;
    }
}
