/* === 1. CSS CUSTOM PROPERTIES (PREVZATÉ Z styles2.css) === */
:root {
    /* Farby - Warm Modern Palette 2025 */
    --mocha: #6B5A4F;
    --mocha-light: #8B7766;
    --mocha-dark: #4A3F35;
    
    --primary: #F3B200; /* Hlavná farba (zlatá/žltá) */
    --primary-dark: #4338CA;
    --primary-light: #6366F1;
    
    --accent: #003366; /* Akcentová farba (tmavomodrá) */
    --accent-light: #F472B6;
    
    /* Neutrals */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    
    --bg-body: #FAFAFA;
    --bg-panel: #FFFFFF;
    --bg-elevated: #FFFFFF;
    
    --border: var(--gray-200);
    --border-focus: var(--primary-light);
    
    /* === PRIDANÁ CHÝBAJÚCA PREMENNÁ === */
    --destructive-color: #ae1a09; /* Prevzaté z styles3.css */

    /* Typography */
    --font-heading: 'Space Grotesk', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    
    /* Spacing & Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 
        0 1px 2px 0 rgba(0, 0, 0, 0.03),
        0 1px 3px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 4px 6px -4px rgba(0, 0, 0, 0.05);
    
    /* Glassmorphism */
    --glass-bg: rgb(255, 255, 255);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Transitions */
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Mapovanie starých premenných na nové */
    --accent-color: var(--accent); /* Nová akcentová modrá */
}

/* === 2. ANIMATED BACKGROUND ORBS (PREVZATÉ) === */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--mocha), var(--primary));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* === 3. ZÁKLADNÉ ŠTÝLY === */
body { 
    font-family: var(--font-body); /* NOVÉ PÍSMO */
    margin: 0;
    padding: 20px;
    background-color: transparent; /* POVINNÉ PRE "ORBS" */
    color: var(--text-primary); /* NOVÁ FARBA TEXTU */
    line-height: 1.6;
    box-sizing: border-box;
}

/* === 4. UPRAVENÝ PÔVODNÝ ŠTÝL .container === */
.container {
    max-width: 800px;
    margin: 0 auto;
    
    /* "Sklenený" efekt z styles2.css */
    background-color: var(--glass-bg); 
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

#top-container {
    position: sticky;
    top: 20px; 
    z-index: 100; 
}

/* === 5. NOVÉ ŠTÝLY PRE HEADER A LOGO === */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px; /* Pridaná medzera pod hlavičkou */
}

h1 {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0;
    /* Pôvodné text-align: center; odstránené */
}

.header-logo-container {
    width: 108px;  /* Zmenšené oproti originálu, aby sa hodilo */
    height: 108px;
    margin-left: 15px;
    flex-shrink: 0; /* Zabráni zmenšeniu loga */
    
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
}

.header-logo-container:hover {
    box-shadow: var(--shadow-sm); 
    background: transparent;
    animation: none;
}

.header-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    position: relative; 
    z-index: 2;        
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo-container:hover .header-logo-img {
    transform: scale(1.63) rotate(360deg);
    filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.3));
}

/* === 6. NOVÉ ŠTÝLY PRE FILE UPLOAD (DRAG & DROP) === */

/* Pôvodné .upload-container štýly boli odstránené */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px; /* Zväčšený padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    background-color: transparent;
    text-align: center;
    margin-bottom: 20px; /* Pôvodná medzera z .upload-container */
}

.file-drop-zone:hover {
    border-color: var(--gray-400);
}

/* Štýl pre drag-over - musí byť pridaný cez JS */
.file-drop-zone.active,
.file-drop-zone.drag-over {
    border-color: var(--primary);
    border-style: solid;
    background-color: var(--gray-50);
    box-shadow: var(--shadow-sm);
}

.drop-zone-text {
    color: var(--text-secondary);
    transition: var(--transition-base);
    line-height: 1.4;
    font-size: 1.1rem;
}

.drop-zone-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Štýl pre zobrazenie názvu súboru (používa pôvodné #file-info) */
.file-name-display {
    display: none; /* Štandardne skrytý */
    color: var(--text-primary);
    font-weight: 500;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    word-break: break-all;
    margin-top: 10px;
}

/* Štýl, keď je súbor vybratý (musí byť pridaný cez JS) */
.file-drop-zone.file-selected {
    border-style: solid;
    border-color: var(--accent);
    background-color: var(--gray-50);
}

.file-drop-zone.file-selected .drop-zone-text {
    display: none; /* Skryje pôvodný text... */
}

.file-drop-zone.file-selected .file-name-display {
    display: block; /* ...a zobrazí názov súboru. */
}

/* === 7. UPRAVENÉ ŠTÝLY TLAČIDIEL === */
.button {
    border: none;
    padding: 10px 20px; /* Pôvodný padding */
    border-radius: var(--radius-md); /* Nový radius */
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px; /* Pôvodná veľkosť */
    background-color: var(--accent); /* Nová farba pozadia */
    color: white;
    transition: all var(--transition-base); /* Zjednodušená tranzícia (bez background-position) */
}

.button:hover {
    filter: brightness(1.8); 
    box-shadow: 0 0 12px 3px rgba(0, 51, 102, 0.4);
}

.button:disabled {
    background-image: none;
    background-color: var(--gray-300); /* Z .styles.css: #cccccc */
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
    color: var(--gray-500);
}

/* === ZMENA: UPRAVENÉ ŠTÝLY PRE SEKUNDÁRNE TLAČIDLO (VYMAŽ) === */
.button--secondary {
    background-image: none;
    background-color: var(--bg-elevated); /* Biele pozadie */
    color: var(--destructive-color); /* Červený text */
    border: 1px solid var(--destructive-color); /* Červené orámovanie */
    box-shadow: var(--shadow-sm);
}

.button--secondary:hover:not(:disabled) {
    background-position: left center; /* Reset primárneho hover efektu */
    background-color: var(--destructive-color); /* Červené pozadie */
    color: white; /* Biely text */
    border-color: var(--destructive-color); /* Zaistí, že orámovanie zostane červené */
    transform: translateY(-2px); /* Ponechanie hover efektu */
    box-shadow: var(--shadow-md); /* Ponechanie hover efektu */
}

.button--secondary:disabled {
    background-image: none;
    background-color: var(--gray-300);
    border: 1px solid var(--gray-300); /* Pridané pre konzistenciu */
    color: var(--gray-500);
    transform: none;
    box-shadow: var(--shadow-sm);
}
/* === KONIEC ZMENENÝCH ŠTÝLOV === */

/* === 9. KĽÚČOVÉ SNÍMKY PRE ANIMÁCIE === */
@keyframes gradientPan {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* === 10. NOTIFIKÁCIE (TOAST) - KOMPLETNÁ PRESTAVBA === */

#status {
    position: fixed;
    top: 20px; /* ZMENA: Z 'bottom' na 'top' */
    right: 20px;
    padding: 1rem; /* ZMENA: Použitý 1rem (16px) */
    border-radius: var(--radius-md); /* ZMENA: Zväčšený radius */
    z-index: 1001;
    box-shadow: var(--shadow-lg); /* ZMENA: Väčší tieň */
    color: var(--text-primary); /* ZMENA: Farba textu */
    font-weight: 500; /* ZMENA: Upravená hrúbka */
    opacity: 0;
    transform: translateY(-20px); /* ZMENA: Animácia zhora */
    transition: all 0.5s ease;
    font-family: var(--font-body);
    background-color: var(--bg-panel); /* ZMENA: Biele pozadie */
    border: 1px solid var(--border); /* ZMENA: Pridaný defaultný border */
    
    /* Pridané pre flex layout (ikona, text, close) */
    display: flex;
    align-items: flex-start; /* Zarovná ikonu a text hore */
    gap: 12px;
    width: 350px; /* Pevná šírka pre pekný vzhľad */
    box-sizing: border-box;
    
    /* Odstránené staré vlastnosti */
    margin-top: 0;
}

#status.show {
    opacity: 1;
    transform: translateY(0);
}

/* Farby pre jednotlivé typy (svetlé pozadie, tmavší okraj) */
#status.success {
    background-color: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.3);
}
#status.error {
    background-color: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.3);
}
#status.info {
    background-color: rgba(52, 152, 219, 0.05);
    border-color: rgba(52, 152, 219, 0.3);
}

/* === NOVÉ ŠTÝLY PRE OBSAH NOTIFIKÁCIE === */
.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px; /* Malé doladenie zarovnania */
}

.notification-content {
    flex-grow: 1;
    line-height: 1.4;
    /* Zabezpečí, že text sa správne zalamuje */
    word-break: break-word;
}

.notification-content strong {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-bottom: 2px;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: var(--transition-base);
}

.notification-close:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* Farby ikon podľa typu */
#status.success .notification-icon { color: #2ecc71; }
#status.error .notification-icon { color: var(--destructive-color); }
#status.info .notification-icon { color: #3498db; }


/* === 11. PRIDANÉ ŠTÝLY PRE MODÁLNE OKNÁ (Z KROKR APLIKÁCIE) === */

.modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(8px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 3000; 
    opacity: 0; 
    transition: opacity var(--transition-smooth); 
    pointer-events: none; 
}
.modal-overlay.active { 
    opacity: 1; 
    pointer-events: auto; 
}

.modal-content { 
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); 
    max-width: 810px; 
    width: 90%; 
    max-height: 90vh; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    padding: 0;
    transform: scale(0.9) translateY(20px); 
    transition: transform var(--transition-smooth);
}
.modal-overlay.active .modal-content { 
    transform: scale(1) translateY(0); 
}

.modal-header { 
    padding: var(--space-6, 24px);
    border-bottom: 1px solid var(--border); 
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { 
    margin: 0; 
    font-family: var(--font-heading);
    font-size: 1.25rem; 
    color: var(--text-primary);
}
.modal-body { 
    padding: var(--space-6, 24px);
    overflow-y: auto; 
    color: var(--text-secondary);
}
.modal-body p {
    color: var(--text-secondary);
}
.modal-body b {
    color: var(--text-primary);
}

.modal-close-btn { 
    position: static;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--gray-100);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    transition: all var(--transition-base);
}
.modal-close-btn:hover { 
    background: var(--destructive-color); 
    color: white; 
    transform: rotate(90deg); 
}

/* Hlavička pre modály (z KROKR) */
.help-center-header { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    color: var(--accent-color); 
}
.help-center-header i { font-size: 1.5rem; }
.help-center-header .title-group { text-align: left; }
.help-center-header .title-group h3 { 
    margin-bottom: 0; 
    font-family: var(--font-heading);
    color: var(--text-primary);
}
.help-center-header .title-group span { 
    font-size: 0.9rem; 
    color: var(--text-tertiary); 
    font-weight: 400; 
}

/* === 12. PRIDANÉ ŠTÝLY PRE .btn (POUŽITÉ V MODÁLOCH) === */
.btn {
    border: none;
    padding: 10px 20px; 
    border-radius: var(--radius-md); 
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px; 
    background-color: var(--accent); 
    color: white;
    transition: all var(--transition-base);
}
.btn:hover:not(:disabled) {  
    filter: brightness(1.8); 
    box-shadow: 0 0 12px 3px rgba(0, 51, 102, 0.4);
}
.btn:disabled { 
    cursor: not-allowed; 
    background: var(--gray-200); 
    color: var(--gray-400); 
    box-shadow: none; 
    transform: none;
}
.btn--primary {
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn--secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn--secondary:hover:not(:disabled) {
    background: var(--gray-50);
}


/* === 13. PRIDANÉ ŠTÝLY PRE ZOZNAM E-MAILOV A NÁHĽAD === */
.email-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 60vh;
    overflow-y: auto;
}
.email-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}
.email-list-item:last-child {
    border-bottom: none;
}
.email-list-item span {
    font-weight: 500;
    color: var(--text-primary);
}
.email-list-item span i {
    margin-right: 10px;
    color: var(--text-tertiary);
}
.email-list-item .email-not-found {
    color: var(--destructive-color);
    font-size: 0.9em;
    font-weight: 500;
    text-align: right;
}
.email-list-item .email-not-found i {
    margin-right: 5px;
}

.email-preview-box {
    border: 1px solid var(--glass-border); /* ZMENA: Použité priehľadné orámovanie */
    padding: 1rem;
    border-radius: var(--radius-md);
    background-color: var(--glass-bg); /* ZMENA: Použité sklenené pozadie */
    max-height: 40vh;
    overflow-y: auto;
    font-size: 0.9em;
}
.email-preview-box table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent; /* Pôvodné (správne) */
}
.email-preview-box th, 
.email-preview-box td {
    border: 1px solid var(--border);
    padding: 8px;
    text-align: left;
}
.email-preview-box th {
    background-color: transparent; /* Pôvodné (správne) */
    font-weight: 600;
    color: var(--text-primary);
}

.email-preview-actions {
    background-color: var(--glass-bg); /* ZMENA: Použité sklenené pozadie */
    border: 1px solid var(--glass-border); /* ZMENA: Pridané priehľadné orámovanie */
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 1.5rem;
}
.email-preview-actions p {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9em;
}
