/* Estilos globais para o AZTicket */

/* Layout para footer sempre no fundo */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Conteúdo principal que ocupa o espaço disponível */
.main-content {
    flex: 1 0 auto;
}

/* Footer que fica sempre no fundo */
.footer {
    flex-shrink: 0;
    background: #343a40;
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

/* Estilos para páginas com sidebar */
.page-with-sidebar {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 250px;
    position: fixed;
    height: 100vh;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 10px;
    margin: 5px 0;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.main-content-with-sidebar {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-area {
    flex: 1;
    padding: 2rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content-with-sidebar {
        margin-left: 0;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
}

/* Estilos para páginas sem sidebar */
.page-without-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-without-sidebar {
    flex: 1;
    padding: 2rem 0;
}

/* Estilos gerais */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

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

.evento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.evento-imagem {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Estilos para cards e elementos do admin */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.qr-scanner {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
}

.bilhete-info {
    border-left: 4px solid #28a745;
    background: #f8fff9;
}

.bilhete-info.utilizado {
    border-left-color: #dc3545;
    background: #fff8f8;
}

.viewport {
    position: relative;
    width: 100%;
    height: 300px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
}

.viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewport canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Estilos para o carrossel de slides */
.slides-section {
    margin-bottom: 0;
}

.slide-background {
    height: 75vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.slide-overlay.no-opacity {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    background-size: initial !important;
    background-position: initial !important;
    background-repeat: initial !important;
    background-attachment: initial !important;
    background-origin: initial !important;
    background-clip: initial !important;
}

/* Regra mais específica para garantir que funcione */
.carousel .slide-overlay.no-opacity {
    background: transparent !important;
    background-image: none !important;
}

/* Regra ainda mais específica */
.carousel-inner .carousel-item .slide-background .slide-overlay.no-opacity {
    background: transparent !important;
    background-image: none !important;
}

.slide-title {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-description {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Ajustar texto quando não há opacidade */
.slide-overlay.no-opacity .slide-title {
    color: #333;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.slide-overlay.no-opacity .slide-description {
    color: #333;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Responsividade para o carrossel */
@media (max-width: 768px) {
    .slide-background {
        height: 50vh;
        min-height: 300px;
    }
    
    .slide-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .slide-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .min-vh-75 {
        min-height: 50vh;
    }
    
    .slide-overlay .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Ajustes para ecrãs muito pequenos */
@media (max-width: 576px) {
    .slide-background {
        height: 40vh;
        min-height: 250px;
    }
    
    .slide-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .slide-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .min-vh-75 {
        min-height: 40vh;
    }
    
    .slide-overlay .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .carousel-indicators {
        bottom: 15px;
    }
    
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    /* Melhorar espaçamento do conteúdo */
    .slide-overlay .container {
        padding: 1rem;
    }
    
    .slide-overlay .row {
        margin: 0;
    }
    
    .slide-overlay .col-sm-12 {
        padding: 0.5rem;
        text-align: center;
    }
}

/* Ajustes para ecrãs extra pequenos (smartphones pequenos) */
@media (max-width: 480px) {
    .slide-background {
        height: 35vh;
        min-height: 200px;
    }
    
    .slide-title {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
    
    .slide-description {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }
    
    .min-vh-75 {
        min-height: 35vh;
    }
    
    .slide-overlay .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .carousel-indicators button {
        width: 6px;
        height: 6px;
        margin: 0 2px;
    }
    
    /* Corrigir corte nas laterais no iPhone */
    .slide-overlay .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        margin: 0;
    }
    
    .slide-overlay .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .slide-overlay .col-sm-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Melhorar experiência de toque em dispositivos móveis */
@media (hover: none) and (pointer: coarse) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
        opacity: 0.8;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .carousel-indicators button {
        min-width: 12px;
        min-height: 12px;
    }
}

/* Correções específicas para iPhone e dispositivos iOS */
@supports (-webkit-touch-callout: none) {
    .slide-overlay .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .slide-overlay .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .slide-overlay .col-sm-12 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .slide-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .slide-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* Correções para viewport do iPhone */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    .slide-overlay .container {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
    
    .slide-overlay .col-sm-12 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Correções adicionais para iPhone com notch */
@supports (padding: max(0px)) {
    .slide-overlay .container {
        padding-left: max(20px, env(safe-area-inset-left)) !important;
        padding-right: max(20px, env(safe-area-inset-right)) !important;
    }
    
    .slide-overlay .col-sm-12 {
        padding-left: max(15px, env(safe-area-inset-left)) !important;
        padding-right: max(15px, env(safe-area-inset-right)) !important;
    }
}

/* Garantir que o conteúdo não seja cortado */
.slide-overlay {
    overflow: hidden;
}

.slide-overlay .container {
    overflow: visible;
}

.slide-overlay .row {
    overflow: visible;
}

.slide-overlay .col-sm-12 {
    overflow: visible;
}

/* ===== CORREÇÕES PARA FORM-CHECK ===== */
/* Melhorar a área clicável dos checkboxes */
.form-check-input {
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Aumentar área clicável */
.form-check-input::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: -1;
}

/* Melhorar feedback visual */
.form-check-input:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: scale(1.05);
}

/* Estado ativo para melhor feedback */
.form-check-input:active {
    transform: scale(0.95);
}

/* Melhorar label para área clicável maior */
.form-check-label {
    cursor: pointer !important;
    user-select: none !important;
    padding: 4px 0 !important;
    display: inline-block !important;
}

/* Área clicável estendida para o label */
.form-check {
    position: relative;
    cursor: pointer !important;
}

.form-check::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    z-index: 0;
}

/* Melhorar contraste e visibilidade */
.form-check-input:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.form-check-input:checked:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* Estado de erro */
.form-check-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Estado de sucesso */
.form-check-input.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Melhorar para dispositivos móveis */
@media (max-width: 768px) {
    .form-check-input {
        min-width: 20px !important;
        min-height: 20px !important;
    }
    
    .form-check-label {
        font-size: 16px !important; /* Evitar zoom no iOS */
        line-height: 1.4 !important;
        padding: 6px 0 !important;
    }
    
    /* Aumentar área clicável em dispositivos móveis */
    .form-check-input::before {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
    }
}

/* Suporte para modo escuro */
@media (prefers-color-scheme: dark) {
    .form-check-input {
        background-color: #495057 !important;
        border-color: #6c757d !important;
    }
    
    .form-check-input:checked {
        background-color: #007bff !important;
        border-color: #007bff !important;
    }
    
    .form-check-label {
        color: #e9ecef !important;
    }
}

/* Animações suaves */
.form-check-input,
.form-check-label {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Estado de loading (opcional) */
.form-check-input.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Melhorar acessibilidade */
.form-check-input:focus-visible {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
}

/* Suporte para teclado */
.form-check-input:focus-visible::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #007bff;
    border-radius: 4px;
    opacity: 0.5;
}

/* Estado de toque para dispositivos móveis */
.form-check-input.touching {
    transform: scale(0.9);
    opacity: 0.8;
}

/* Melhorar para formulários complexos */
.form-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-check-group .form-check {
    margin-bottom: 0.25rem;
}

/* Suporte para checkboxes customizados */
.form-check-input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #6c757d;
    border-radius: 0.25rem;
    background-color: #fff;
    position: relative;
    cursor: pointer;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    line-height: 1;
}

/* Suporte para radio buttons */
.form-check-input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #6c757d;
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    cursor: pointer;
}

.form-check-input[type="radio"]:checked {
    border-color: #007bff;
}

.form-check-input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background-color: #007bff;
    border-radius: 50%;
} 