/*
 * Estilos base de la aplicación.
 * El branding dinámico se inyecta desde PHP (custom properties).
 */

html, body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.brand-logo {
    max-height: 38px;
    max-width: 120px;
    object-fit: contain;
}

.app-logo {
    max-height: 110px;
    max-width: 240px;
    object-fit: contain;
}

.brand-logo-box {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.brand-logo-box .app-logo {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
}

#qr-reader {
    border-radius: 0.5rem;
    overflow: hidden;
}

#qr-reader video {
    border-radius: 0.5rem;
}

/* Cards con fondo semitransparente para mejorar legibilidad sobre imágenes */
.card {
    background-color: rgba(255, 255, 255, 0.96);
}

/* Botones principales usan las custom properties */
.btn-brand {
    transition: filter 0.15s ease-in-out;
}

.badge-disp { background-color: #198754; color: #fff; }
.badge-used { background-color: #6c757d; color: #fff; }
.badge-exp { background-color: #dc3545; color: #fff; }
.badge-fut { background-color: #fd7e14; color: #000; }
.badge-none { background-color: #6c757d; color: #fff; }

.list-group-item {
    border-left: 4px solid var(--brand-accent, #a40a0a);
}

#scan-area .card-body {
    padding: 0.5rem;
}

/* Mi empresa */
.color-picker {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.25rem;
    background-color: #fff;
    cursor: pointer;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 0.25rem;
}

.direccion-row input::placeholder {
    color: #adb5bd;
}

#brand-preview {
    transition: background-color 0.2s ease, color 0.2s ease;
}

#brand-preview .brand-preview-navbar {
    transition: background-color 0.2s ease, color 0.2s ease;
}

#preview-logo {
    display: none;
}

#preview-logo[src]:not([src=""]) {
    display: inline-block;
}

/* Pantallas pequeñas */
@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    .display-5 {
        font-size: 1.75rem;
    }
    .app-logo {
        max-height: 90px;
    }
    .btn-lg {
        font-size: 1.1rem;
    }
}
