/**
 * Component Styles for DondeApp
 * Extracted from inline styles in index.html
 * Uses CSS variables for consistency
 */

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0));
    z-index: 9999;
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0));
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.cookie-banner-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 220px;
}

.cookie-banner-title {
    font-weight: 900;
    margin-bottom: 6px;
    font-size: 14px;
}

.cookie-banner-description {
    font-size: 12.5px;
    opacity: 0.92;
    line-height: 1.35;
}

.cookie-banner-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 900;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-cookie-accept {
    background: var(--primary-color, #ce2029);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cookie-accept:hover {
    background: var(--primary-dark, #b71c1c);
}

.btn-cookie-close {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cookie-close:hover {
    background: rgba(255, 255, 255, 0.20);
}

/* ========== OVERLAY PUBLICITARIO ========== */
.overlay-publicitario {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#overlay-publicitario:not(.active) {
    display: none !important;
    pointer-events: none;
}

.overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.overlay-content-inner {
    position: relative;
    overflow: hidden;
}

.overlay-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: auto;
}

.overlay-link img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: contain;
    cursor: pointer;
    pointer-events: auto;
}

.overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    user-select: none;
    transition: background 0.2s;
}

.overlay-close:hover {
    background: rgba(206, 32, 41, 0.9);
    transform: scale(1.1);
}

/* ========== MENÚ HAMBURGUESA ========== */
.menu-hamburguesa-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-hamburguesa {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    overflow-x: hidden;
    flex-direction: column;
    flex: 1 1 auto;
}

.menu-hamburguesa-header {
    padding: max(20px, env(safe-area-inset-top, 0)) 20px 20px;
    border-bottom: 1px solid #eee;
}

.menu-hamburguesa-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.menu-hamburguesa-title {
    margin: 0;
    color: var(--primary-color, #ce2029);
    font-weight: 900;
    font-size: 20px;
}

/* Botón cerrar menú: moderno, circular, 44x44px, feedback táctil */
.btn-cerrar-menu-moderno {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-cerrar-menu-moderno .btn-cerrar-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #a01820;
}

.btn-cerrar-menu-moderno:active {
    transform: scale(0.95);
    background: #e9ecef;
}

.menu-hamburguesa-content {
    padding: 20px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

.menu-hamburguesa a,
.menu-hamburguesa button:not(.btn-cerrar-menu-moderno) {
    min-width: 0;
    overflow: hidden;
}

.menu-hamburguesa a i,
.menu-hamburguesa button:not(.btn-cerrar-menu-moderno) i {
    flex-shrink: 0;
}

.menu-hamburguesa-footer {
    flex-shrink: 0;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.menu-hamburguesa-footer button {
    width: 100%;
    text-align: left;
}

/* ========== MODAL BASE ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    cursor: pointer;
    font-size: 20px;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.close-btn:hover {
    background: #f0f0f0;
}

.modal-title {
    margin: 0 0 20px 0;
    color: var(--primary-color, #ce2029);
    font-weight: 900;
}

.modal-body {
    /* Contenido del modal */
}

/* ========== MI CUENTA - PREMIUM LAYOUT ========== */
.account-container {
    max-width: 1100px;
    margin: auto;
    padding: 24px;
}

.grid-account {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.grid-account > * {
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .grid-account {
        grid-template-columns: 1fr 1fr;
    }
}

.card-premium {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.card-header {
    margin: 0 0 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.section-title-modern {
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 17px;
    color: #1a1a1a;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.input-modern {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
    transition: 0.2s;
    box-sizing: border-box;
    margin-bottom: 12px;
    font-size: 14px;
}

.input-modern:focus {
    border-color: #d92323;
    background: #fff;
    outline: none;
}

.btn-primary-modern {
    background: #d92323;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    margin-top: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-primary-modern:hover {
    background: #b51d1d;
}

.dac-badge {
    font-weight: 700;
    color: #d92323;
    font-size: 18px;
}

.identidad-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
