/* site.css - Global styles for the StoryFaceAI PhotoBooth application */

/* Reset and base styles */
html {
    position: relative;
    min-height: 100%;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* Main content container */
main {
    flex: 1 0 auto;
}

/* Global layout helpers */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.2;
    color: #212529;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: #6200ee;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #3700b3;
    text-decoration: underline;
}

/* Buttons with primary color matching the app theme */
.btn-primary {
    background-color: #6200ee;
    border-color: #6200ee;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #3700b3;
    border-color: #3700b3;
}

.btn-outline-primary {
    color: #6200ee;
    border-color: #6200ee;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: #6200ee;
    border-color: #6200ee;
}

/* Custom button sizes and shapes */
.btn {
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1.25rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    margin-right: 0.5rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Custom navbar styling */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #6200ee !important;
}

.navbar-brand {
    font-weight: 500;
    font-size: 1.25rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* Form elements */
.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #6200ee;
    box-shadow: 0 0 0 0.2rem rgba(98, 0, 238, 0.25);
}

/* Modal customization */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Cards and panels */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.card-body {
    padding: 1.25rem;
}

/* Alerts and notifications */
.alert {
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: #e6f7ed;
    color: #0d6832;
}

.alert-danger {
    background-color: #fce8e8;
    color: #c62828;
}

.alert-warning {
    background-color: #fff8e6;
    color: #b76e00;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
}

/* Utils - Spacing helpers */
.mt-auto {
    margin-top: auto !important;
}

.mb-auto {
    margin-bottom: auto !important;
}

/* Utils - Flexbox helpers */
.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

/* Utils - Text helpers */
.text-center {
    text-align: center !important;
}

.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Utils - Background helpers */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #ffffff !important;
}

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

/* Responsive utilities */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* QR scanner specific styles */
#qrScanner {
    width: 100%;
    max-width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #000;
    position: relative;
}

#qrScanner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.4s ease-out;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
    padding: 0.75rem;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 2px solid #6200ee;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid #6200ee;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        padding: 0;
        margin: 0;
    }

    .container, .container-fluid {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    a[href]:after {
        content: none !important;
    }
}

.language-selector {
    display: flex;
    align-items: center;
}

.language-selector .btn-group {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.language-selector .btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border: none;
}

.language-selector .btn-outline-light {
    background-color: transparent;
}

.language-selector .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-selector .btn-light.active {
    color: #6200ee;
    font-weight: 500;
}

@media (max-width: 576px) {
    .language-selector .btn {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
}