/* =========================================
   Gerador de QRCode - Sistema Hermes
   Trio Interativa
   ========================================= */

:root {
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --secondary-color: #ffc107;
    --secondary-dark: #e0a800;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    filter: brightness(1.1);
}

.navbar-brand span {
    color: var(--secondary-color) !important;
    font-weight: 600;
    font-size: 1.1rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.page-title p {
    color: #666;
    font-size: 1.1rem;
}

.badge-free {
    background: var(--secondary-color);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

/* QR Type Cards */
.qr-type-card {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.qr-type-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.2);
}

.qr-type-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.qr-type-card.active .qr-icon {
    color: var(--secondary-color);
}

.qr-type-card.active h5 {
    color: white;
}

.qr-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.qr-type-card h5 {
    font-weight: 600;
    margin: 0;
    color: #333;
    font-size: 0.95rem;
}

/* Form Section */
.form-section {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: var(--secondary-color);
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

/* QR Code Display */
.qr-display {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.qr-display h4 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
}

#qrcode-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    display: inline-block;
    margin-bottom: 25px;
    min-height: 280px;
    min-width: 280px;
}

#qrcode-container img, 
#qrcode-container svg {
    max-width: 100%;
    height: auto;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    min-height: 220px;
}

.qr-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border: none;
    color: #000;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.4);
    color: #000;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-download {
    margin: 5px;
    min-width: 120px;
}

.download-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    color: white;
    padding: 30px 0;
    margin-top: auto;
}

footer .logo-footer {
    height: 50px;
    margin-bottom: 15px;
}

footer h5 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

/* Hidden Form Panels */
.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .qr-type-card {
        padding: 20px 15px;
    }
    
    .qr-icon {
        font-size: 2rem;
    }
    
    .form-section, .qr-display {
        padding: 20px;
    }
    
    #qrcode-container {
        min-height: 200px;
        min-width: 200px;
        padding: 20px;
    }
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    color: #000;
}

.info-box i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.info-box h5 {
    margin: 0;
    font-weight: 600;
}

.info-box p {
    margin: 5px 0 0 0;
    opacity: 0.8;
}

/* Tabs Style */
.nav-pills .nav-link {
    color: var(--primary-color);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 2px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-pills .nav-link:hover:not(.active) {
    background: rgba(220, 53, 69, 0.1);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-upload-area p {
    color: #666;
    margin: 0;
}

/* Preview images */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
}

/* Poster/Cartaz Section */
.poster-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    color: #000;
}

.poster-section h5 {
    font-weight: 700;
    margin-bottom: 15px;
}

.poster-section .form-control {
    background: white;
}

.btn-poster {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-poster:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-poster:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Color Picker Buttons */
.btn-color-picker {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-color-picker:hover {
    transform: scale(1.1);
}

.btn-color-picker.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.5);
}

/* QR Code with Frame */
.qr-with-frame {
    display: inline-block;
    padding: 15px;
    border-radius: 15px;
    background: white;
}

.qr-frame-text {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
}

/* Logo preview */
#logo-preview {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Botão de colar para textareas */
.btn-paste-textarea {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 10px;
    font-size: 0.85rem;
    z-index: 10;
    background: #fff;
    border: 1px solid #ced4da;
}

.btn-paste-textarea:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-paste:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
