/* -----------------------------------------
   ZONEMATCH.APP - GLOBAL STYLES
   ----------------------------------------- */

/* Variables globales */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #22c55e;
    --success-dark: #16a34a;
    --warning: #eab308;
    --danger: #ef4444;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --radius-card: 16px;
    --radius-btn: 999px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-white);
    color: var(--text-main);
    line-height: 1.5;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-btn {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
    display: none;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-icon, .lang-icon {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.3rem;
    transition: var(--transition);
}

.search-icon:hover, .lang-icon:hover {
    color: var(--primary);
}

/* Sidebar escritorio */
.sidebar {
    width: 25%;
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    background: var(--bg-light);
}

.sidebar h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.tools-list {
    list-style: none;
}

.tools-list li {
    margin-bottom: 1.25rem;
}

.tools-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: var(--transition);
}

.tools-list a:hover {
    background: var(--border);
    color: var(--text-main);
}

/* Mobile tools */
.mobile-tools {
    display: none;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    justify-content: space-around;
    flex-wrap: wrap;
}

.mobile-tools a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.3rem;
    min-width: 50px;
    transition: var(--transition);
}

.mobile-tools a:hover {
    color: var(--primary);
}

.mobile-tools .emoji {
    font-size: 1.4rem;
}

/* Layout principal */
.main-layout {
    display: flex;
    min-height: calc(100vh - 140px);
}

.content {
    width: 75%;
    padding: 2rem 2.5rem;
}

/* Buscador */
.search-expanded {
    display: none;
    padding: 1rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

#suggestionsBox {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.suggestion-item:hover {
    background: var(--bg-light);
}

.suggestion-item .country {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Botones base */
.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    padding: 0.4rem 1.2rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-light);
}

.btn-green {
    background: var(--success);
    color: #1e40af;
    border: none;
    border-radius: var(--radius-btn);
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-green:hover {
    background: var(--success-dark);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.moon-phase {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Tooltip flotante móvil */
#mobileTooltip {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    z-index: 2000;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: var(--shadow);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    max-width: 600px;
    width: 90%;
    max-height: 85%;
    overflow-y: auto;
    border-radius: 24px;
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger);
}

/* Utilidades */
.text-muted {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
    
    .mobile-tools {
        display: flex;
    }
    
    .content {
        width: 100%;
        padding: 1rem;
    }
    
    .footer {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }
    
    .button-group {
        width: 100%;
    }
    
    .btn-icon, .btn-green {
        flex: 1;
        text-align: center;
    }
}

/* ============================================ */
/* CORRECCIÓN BOTÓN ADD CITY                    */
/* ============================================ */
.desktop-text {
    display: inline;
}

.mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .desktop-text {
        display: none !important;
    }
    .mobile-text {
        display: inline !important;
    }
}