:root {
    --color-black: #000000; /* var(--color-gray-special); */
    --color-dark: #1a1a1a;
    --color-gray: #2b2b2b;
    --color-light-gray: #3e3e3e;
    --color-purple1: #4d20a1;
    --color-purple1_1: #4d20a17c;
    --color-purple2: #5d26c0;
    --color-purple3: #612bc4;
    --color-purple5: #7340d2b9;
    --color-purple4: #f8f4ff;
    --color-purple6: #9c69fa;
    --color-blue1: #306ef8;
    --color-blue1-1: #306ff8ac;
    --color-blue2: #27a3fb;
    --color-blue-green: #62dad3;
    --color-gray-special: #4a372838;
}

/* --- Pretty DataTable for LLM pipe-markdown --- */
.llm-table-wrap { margin: 12px 0; border: none; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);}
.llm-table-toolbar { display:flex; gap:8px; align-items:center; padding:8px 10px; background:#fafafa; border-bottom:1px solid #eee; }
.llm-table-toolbar button { font-size:12px; padding:6px 10px; border:none; background:#fff; border-radius:8px; cursor:pointer; box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2); }
.llm-table-toolbar button:hover { background:#f5f5f5; }
.llm-table { width:100%; border-collapse:collapse; font-size:14px; }
.llm-table thead th { position:sticky; top:0; background:#fff; z-index:1; border-bottom:1px solid #eee; text-align:left; padding:10px; cursor:pointer; }
.llm-table tbody td { border-top:1px solid #f2f2f2; padding:10px; vertical-align:top; }
.llm-table tbody tr:nth-child(even) { background:#fcfcfc; }
.sort-ind { opacity:0.4; margin-left:6px; font-size:11px; }
.chip { display:inline-block; padding:3px 8px; border-radius:999px; border:1px solid transparent; font-size:12px; line-height:1; }
.chip-prob-high { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.chip-prob-mid { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.chip-prob-low { background:#ecfccb; color:#3f6212; border-color:#d9f99d; }
.chip-impact-high { background:#ffe4e6; color:#9f1239; border-color:#fecdd3; }
.chip-impact-mid { background:#e0f2fe; color:#075985; border-color:#bae6fd; }
.chip-impact-low { background:#e7ffe7; color:#065f46; border-color:#bbf7d0; }





* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

/* Main container styles */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background: #f6f6f6;
    display: flex;
    height: 100dvh; /* PRIDAŤ - moderné riešenie pre viewport */
    height: 100vh; /* PRIDAŤ - fallback */
    margin: 0;
    padding: 0;
}


/* Štýly pre tabuľku faktúr */
.invoices-container {
    width: 100%;
    overflow-x: auto;
  }
  
  .invoices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: Arial, sans-serif;
  }
  
  .invoices-table th, 
  .invoices-table td {
    color:var(--color-gray);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }
  
  .invoices-table th {
    background-color: #f5f5f5;
    font-weight: bold;
  }
  
  .invoices-table tr:hover {
    background-color: #f9f9f9;
  }
  
  .download-btn {
    display: inline-block;
    padding: 5px 10px;
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
  }
  
  .no-data, .error-text, .loading-text {
    text-align: center;
    padding: 20px;
    color: #666;
  }
  
  .error-text {
    color: #d9534f;
  }

.upload-text {
    text-align: left; 
}

.upload-subtext {
    text-align: left; 
}

.popup-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    z-index: 1003;
    height: auto;
    min-height: 10%;
    max-height: 100%;
    border-radius: 20px 20px 20px 20px;
    border: none;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    
    /* Skrytie scrollbaru */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.popup-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}


/* CSS štýly pre platobnú výzvu */
.popup-container-payment {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;  /* Vysoká hodnota z-index, aby bolo nad všetkým */
  }
  
  .popup-content-payment {
    background-color: transparent;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
  }
  
  .popup-content-payment .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .popup-content-payment .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
  }
  

#unpaid {
    font-size: 20px;
    color:#4a3728;
    font-weight: bold;
    color: #c42727;
}




.stats-container {
    display: flex;
    flex-wrap: wrap; /* Umožní zalomenie na ďalší riadok pri nedostatku miesta */
    gap: 20px;
    margin-top: 10px;
    width: 100%;
  }
  
  .stats-card {
    background: #f6f6f6;
    border-radius: 18px;
    padding: 20px;
    flex: 1 1 300px; /* Grow, shrink, basis - zabezpečí flexibilnú šírku s minimálnou šírkou */
    box-sizing: border-box;
    text-align: center;
  }

.stats-card h4 {
    margin-top: 0;
    color: var(--color-gray);
    font-size: 16px;
}

.payment-status.active {
    color: #4CAF50;
    font-weight: bold;
  }
  
  .payment-status.inactive {
    color: #c42727;
    font-weight: bold;
  }

  .popup-container-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f6f6f6;
    z-index: 10000;
  }
  

.close-btn-usage {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-gray);
    padding: 0;
    line-height: 1;
    z-index: 10; /* Aby bolo nad ostatnými prvkami */
  }

#add-payment-method-btn {
    color:#ffffff;
    background-color: #b85438;
}

#add-payment-method-btn:hover {
    color:#4a3728;
    background-color: #dedcd16d;
}

#payment-method-button {
    margin-top: 10px;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
}

#remove-payment-button {
    margin-left: 10px;
    margin-top: 10px;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
}

#invoices-button {
    margin-left: 10px;
    margin-top: 10px;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
}

#update-billing-info-btn {
    margin-top: 30px;
    margin-left: 15px;
    color: var(--color-gray);
    padding: 10px 20px;
    border: 1px solid #4a37282f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #dedcd16d;
}

#update-billing-info-btn:hover {
    color: #ffffff;
    padding: 10px 20px;
    border: 1px solid #4a37282f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #b85438;
}


.processing-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
    text-align: center;
  }
  
  .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

/* Styles for the hint cards */
.hints-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px 10px;
    margin-bottom: 60px;
    transition: opacity 0.3s ease;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }


#loading-gif {
    width: 64px;  /* alebo iná požadovaná veľkosť */
    margin-top: -3px;
    margin-left: -9px;
    position:relative;
}


/* Kontajner pre prihlasovanie */
.auth-buttons {
    position: relative;
    display: flex;
    bottom:10px;
    gap: 12px;
    padding-top: 40px;
    
    background-color: transparent;
    border-radius: 8px;
    border: none;
  }

  .auth-buttons:hover {
    box-shadow: none;
    border:none;
    transition: 1s;
    background-color: transparent;
  }
  
  /* Informácie o používateľovi */
  .user-info {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    color:#4a3728;
  }
  
  /* Profilová fotka */
  .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    
    transition: transform 0.2s;
  }
  
  .user-avatar:hover {
    transform: scale(1.1);
  }
  
  /* Meno používateľa */
  .user-name {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 500;
    color: #333;
    font-size: 16px;
    color:#4a3728;
  }
  
  /* Tlačidlo pre prihlásenie */
  .login-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #4286f400;
    color:#4a3728;
    border: none;
    font-size: 17px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .login-btn:before {
    content: "";
    background-image: url('/static/images/google.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 30px;
    height: 30px;
    display: inline-block;
  }
  
  /* Tlačidlo pre odhlásenie */
  .logout-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color:#4a3728;
    background-color: #f5f5f000;
    border: none;
    padding: 9px 10px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.5s;
    border: none;
  }
  

.social-controls {
    position: fixed;
    top: 0;
    z-index: 1000;
}



/* Základný štýl pre spoločný kontajner */
.main-controls-group {
        position: fixed;
        top: 5px;
        left: 49.5%;
        transform: translateX(-50%);
        z-index: 999; /* Vyššie ako sidebar */
        background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        padding: 5px;
        padding-left: 15px;
        padding-right: 15px;
        gap: 30px;
        border: none;
        display: flex; /* Pridané pre flexbox */
        flex-direction: row; /* Elementy pod sebou */
        align-items: center;
        box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
}





@media (min-width: 1280px) {
    #new-thread-btn::after { 
        content: "Nový Chat";
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        font-size: 13px;
        margin-left: 5px;
        font-weight: 500;
        color:#ffffff;
    }
    
    #custom-data-btn::after { 
        content: "Vlastné podklady";
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        font-size: 13px;
        margin-left: 5px;
        font-weight: 500;
        color:#ffffff;
    }
    
    #search-btn::after { 
        content: "Vyhľadať v ZZ";
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        font-size: 13px;
        margin-left: 5px;
        font-weight: 500;
        color:#ffffff;
    }
    
    #token-stats-btn::after { 
        content: "Spotreba";
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        font-size: 13px;
        margin-left: 5px;
        font-weight: 500;
        color:#ffffff;
    }
}

.social-controls-icon img {
    width: 20px;  /* alebo akúkoľvek inú požadovanú veľkosť */
    height: 20px;
}


.hint-question {
    padding: 8px 10px;
    margin: 5px 0;
    background-color: #f5f5f0;
    border: none;
    border-radius: 11px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Tooltip styling */
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left:60px;
    font-size: 15px;
    color:#ffffff;
    background-color:#b85438;
    padding: 5px 10px;
    border-radius: 8px;
}

/* Special Icon Styles */
#analysis, #custom-data-btn, #create-campaign, #social-share, #token-stats-btn, #new-thread-btn {
    box-shadow: none;
    border:none;
    transition: all 0.3s ease;
    background-color: transparent;
    
    margin-top: 5px;
    cursor: pointer;
}

#custom-data-btn, #token-stats-btn {
    margin-left: 20px;
}

#search-btn {
    display: none;
}





/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-gray);
}

/* Input Elements */
.form-group input,
.form-group select,
.form-group textarea,
.social-controls select,
.social-controls input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f6f6f6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.social-controls select:focus,
.social-controls input[type="date"]:focus {
    outline: none;
    border-color: #f6f6f6;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

/* Upload Zone */
.upload-zone {
    position: relative;
    border: 2px dashed #e1e1e1;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-zone.drag-over {
    border-color: #dedcd1;
    background-color: rgba(44, 62, 80, 0.05);
}

.upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Image Previews */
.image-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview {
    position: relative;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.submit-btn,
.cancel-btn,
.file-upload-label {
    color: var(--color-gray);
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#year-filter,
#month-filter {
    color: var(--color-gray);
    padding: 10px 20px;
    border: 1px solid #4a37282f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin-bottom: 10px;
}

.file-upload-label {
    color: var(--color-gray);
    padding: 10px 28px;
    border: 1px solid #4a37282f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.reset-filter-btn {
    color: var(--color-gray);
    padding: 10px 20px;
    border: 1px solid #4a37282f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    min-width: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #dedcd16d;
    margin-bottom: 20px;
}

.reset-filter-btn:hover {
    background: #b85438;
    color:#ffffff;
}

.filter-info {
    margin-bottom: 20px;
}

.submit-btn, .file-upload-label {
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
    width: 100%;
    color: #ffffff;
}

.cancel-btn {
    background: #e74c3c;
    color: white;
}

.cancel-btn:hover {
    background: #c0392b;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.success {
    background-color: #2ecc71;
}

.notification.error {
    background-color: #e74c3c;
}

#start-date {
    margin-top: 10px;
}

#end-date {
    margin-top: 10px;
    margin-bottom: 10px;
}

#location {
    margin-top: 10px;
}








/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.instagram-only {
    display: none;
}

.instagram .instagram-only {
    display: inline;
}








.download-pdf-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    vertical-align: middle;
    transition: ease 0.3s;
}

.document-reference {
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
    color:#ffffff;
    padding: 2px 6px 2px 6px; /* hore | vpravo | dole | vľavo */
    border-radius: 6px;

}









.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-left: 50px;
    padding-right: 70px;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar {
    display: none;
}

.message {
    max-width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    white-space: pre-line; /* Pridané pre zachovanie nových riadkov */
}

.message p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.message .empty-line {
    height: 1em;
}

.section-divider {
    margin: 10px 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-weight: bold;
}

.user-message {
    background: linear-gradient(110deg, var(--color-blue1)  10%, var(--color-blue1-1)  100%);
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.assistant-message {
    background: #f0f2f500;
    color: var(--color-gray);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.system-message {
    background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
    margin: 0 auto;
    text-align: center;
    max-width: 90%;
    color:#ffffff;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
}

.error-message {
    background: #ffebee;
    margin: 0 auto;
    text-align: center;
    color: #d32f2f;
    max-width: 90%;
}

.input-container {
    padding: 20px;
    background-color: #ffffff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border: none;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    width: 90%;
    margin: 0 auto;
    transition: border 0.2s ease;
    margin-bottom: 1vh;
}


.file-upload {
    margin-bottom: 12px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f2f5;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #dedcd1;
}

.file-upload label:hover {
    background: #e4e6e9;
}

.message-input {
    display: flex;
    gap: 12px;
    align-items: flex-start; /* Zarovnanie na vrch */
}

/* Pridajte nový kontajner pre buttony */
.input-buttons {
    display: flex;
    flex-direction: column; /* Buttony pod sebou */
    gap: 4px; /* Medzera medzi buttonmi */
}



textarea {
    flex: 1;
    font-weight:normal;
    height: 50px;
    min-height: 70px;
    background: #ffffff;
    max-height: 150px;
    padding: 12px;
    border: 1px solid #dddddd00;
    border-radius: 15px;
    resize: none;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-gray);
}

textarea:focus {
    outline: none;
    border-color: #dedcd100;
}


#send-btn {
    background: transparent;
    box-shadow: none;
    height: 20px;
    width: 20px;
    border: none;
    cursor: pointer;
}


#send-btn img {
    height: 20px;
    width: 20px;
    background: transparent;
    box-shadow: none;
    border: none;
}






#record-btn:hover {
    background: #4a372818;
    color: #ffffff;
}

/* Upravte existujúce štýly pre buttony */
#record-btn,
#upload-btn {
    background: transparent; 
    margin-top: 0; /* Zmeňte z margin-top: 5px na 0 */
    border: none; 
    border-radius: 10px; 
    padding: 8px; 
    max-height: 43px; 
    cursor: pointer;
    transition: all 0.3s ease;
}

#upload-btn img {
    width: 20px; /* Nastavte šírku ikony */
    height: 20px; /* Nastavte výšku ikony */
}

#record-btn img {
    width: 20px; /* Nastavte šírku ikony */
    height: 20px; /* Nastavte výšku ikony */
}

  
  #upload-btn:hover {
    background: #4a372818;
    color: #ffffff;
  }
  

.voice-record {
    margin-right: 10px;
}

/* Chat container styles */
.chat-container {
    flex: 1;
    margin: 0 auto; /* Vycentruje kontajner horizontálne */
    width: 90%; /* ZMENIŤ z max-width: calc(100% - 280px); na 100% */
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0);
    transition: margin-left 0.3s ease-in-out, max-width 0.3s ease-in-out;
}

/* PRIDAŤ novú triedu hneď po .chat-container */
.chat-container.sidebar-open {
    margin-left: 280px; /* PRIDAŤ - pôvodná hodnota pre otvorený sidebar */
    max-width: calc(100% - 280px); /* PRIDAŤ - pôvodná hodnota pre otvorený sidebar */
}


/* Modifikácia input containera pre počiatočný stav */
.chat-container:not(.has-messages) .input-container {
    margin-bottom: 40vh; 
    border-radius: 20px;
}


/* Sidebar základné štýly */
.conversation-history {
    position: fixed;
    
    left: 0;
    top: 0;
    width: 280px;
    margin-top: 2Opx;
    background-color: #ffffff;
    border: none;
    border-bottom: none;
    border-top: none;
    padding-left: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 800;
    transition: transform 0.3s ease-in-out, height 0.3s ease-in-out;
    
    /* Flexbox nastavenia */
    display: flex;
    flex-direction: column;
    
    /* Responzívna výška namiesto fixnej percentuálnej hodnoty */
    height: 100%;
    max-height: 100%;
    min-height: 600px;
    transform: translateX(-100%); /* PRIDAŤ tento riadok */
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
  }

  .conversation-history.active {
    transform: translateX(0); /* PRIDAŤ tento riadok */
}

.conversation-history h2 {
    font-size: 1.2rem;
    color: var(--color-purple1);
    padding-right: 95px;
    padding-top: 70px;
    position: fixed;
}

#conversation-list {
    margin-top: 115px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-gray);
    flex: 1;                /* pridané */
    overflow-y: auto;
    scrollbar-width: none;       /* pridané */
     /* pridané - odpočíta priestor pre h2 a margin */
}

.conversation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
  }

  .conversation-item:hover {
    background-color: white;
    margin-right: -20px;
    padding: 3px;
    padding-left: 8px;
    color: var(--color-gray);
    border-radius: 9px
  }
  
  .conversation-item.active {
    background: linear-gradient(110deg, var(--color-purple1)  0%, var(--color-purple5)  100%);
    margin-right: -20px;
    padding: 3px;
    padding-left: 8px;
    color: #ffffff;
    border-radius: 9px;
  }

  .conversation-title {
    flex-grow: 1;
    cursor: pointer;
  }
  
  .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
  }

  .conversation-item.active .delete-btn {
    margin-right: 30px;
  }

  .conversation-item:hover .delete-btn {
    margin-right: 30px;
  }
  
  .delete-btn:hover {
    opacity: 1;
    background-color: #f5f5f0;
    border-radius: 50%;
  }

  /* Základní styl pro skrytí tlačítka */
.hidden-btn {
    opacity: 0;
  }
  
  /* Zobrazení tlačítka při najetí myší na položku konverzace */
  .conversation-item:hover .hidden-btn {
    opacity: 1;
  }


/* Sidebar toggle button */
.sidebar-toggle {
    padding: 6px;
    padding-left: 20px;
        
        display: block;
        position: fixed;
        top: 4px;
        left: 0;
        border: none;
        border-left: none;
        border-left: none;
        border-radius: 0 9px 9px 0;
        /*border-radius: 0 0 12px 0;*/
        background: linear-gradient(110deg, var(--color-purple1_1)  0%, var(--color-purple1)  100%);
        z-index: 1002;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);

}

.sidebar-toggle img {
    width: auto;
    height: 25px;
}




































.drop-zone {
  border: 1px dashed #ccc;
  border-bottom: none;
  padding: 20px;
  text-align: center;
    cursor: pointer;
    border-top-left-radius: 20px;    /* nastaví zaoblenie ľavého horného rohu */
    border-top-right-radius: 20px;
    min-height: 80px;
    max-width: 80%;
    margin-bottom: 0px;
    margin-left: 10%;
    font-size: 15px;
    background: #f6f6f6;
    color: #636363;
 }

 .drop-zone.dragover {
   background: #e3edf8;
   border-color: #638cc1;
   color: #638cc1;
 }





 .platform-logo-fb {
    height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 2px;
}

.platform-logo-ig {
    height: 50px;
    width: auto;
    vertical-align: middle;
    margin-right: 2px;
    margin-left: -5px;
}

 .analysis-header {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    color: #dedcd1;
}

.message-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 8px 0;
    display: block;
}

.message {
    word-break: break-word;
}












    /* GCP Search Styles ----------------------------------------------------------------------------- */



    .popup-content {
        margin-top: 0; /* Zabezpečí že obsah začína hore */
        padding: 40px;
        z-index: 1000;
    }

    .popup-content h3 img {
        width: 1em;
        height: 1em;
        margin-right: 0.5em;
        vertical-align: top;
    }

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

    .popup-header h3 {
        color: var(--color-gray);
        margin: 0;
    }

    .popup-header h3 img {
        width: 1em;
        height: 1em;
        margin-right: 0.5em;
        vertical-align: top;
    }



    .popup-content h3 {
        color: var(--color-purple1);
    }

    #page-usage {
        color: var(--color-gray);
    }

    .close-btn {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 12px;
    top: 20px;
    }

    .search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-direction: column;
    }

    .search-input {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 8px;
        font-size: 0.95rem;
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        background-color: #ffffff;
        color: var(--color-gray);
    }

    .search-input:focus {
        outline: none;
        border-color: #dedcd100;
    }

    .results-list {
        margin-top: 20px;
    }

    .result-item {
        margin-bottom: 20px;
        padding: 15px;
        border: none;
        border-radius: 15px;
        background: #f6f6f6;
        box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
    }

    .result-header {
        display: flex;
        align-items: flex-start;
        margin-bottom: 15px;
        gap: 15px;
    }

    .result-number {
        background: #f6f6f6;
        color: var(--color-gray);
        padding: 4px 10px;
        border-radius: 6px;
        font-weight: 500;
        min-width: 28px;
        text-align: center;
        border: 1px solid #4a37282f;
    }

    .doc-info {
        flex-grow: 1;
    }

    .doc-title {
  font-weight: 500;
  color: var(--color-gray);
  margin-bottom: 8px;
  font-size: 1.1em;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
}

    .doc-actions {
        margin-top: 8px;
    }

    .preview-btn, .save-all-answers-btn {
        padding: 6px 12px;
        background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
        color: #ffffff;
        border: none;
        border-radius: 10px;
        margin-left: 5px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.2s;
        box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    }

    .analyze-btn {
        display: none;
    }

    .save-all-answers-btn {
        padding: 6px 12px;
        background: linear-gradient(110deg, var(--color-purple1)  10%, var(--color-blue1)  100%);
        color: #ffffff;
        border: none;
        border-radius: 8px;
        margin-left: 5px;
        cursor: pointer;
        font-size: 14px;
        transition: background-color 0.2s;
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    }

    .result-content {
        margin-left: 43px;
    }

    .snippet {
        margin-bottom: 8px;
        padding: 8px 12px;
        background: #dedcd100;
        font-size: 0.95em;
        line-height: 1.5;
    }

    .snippet b {
        background-color: var(--color-gray);
        padding: 4px;  /* jeden parametr = stejný padding ze všech stran */
        border-radius: 6px;
        color:#ffffff;
    }

    .no-snippets {
        color: #718096;
        padding: 8px;
    }






    /* GCP Search Styles ----------------------------------------------------------------------------- */











    .message p {
        margin: 0.75em 0;  /* Pridá vertikálny spacing medzi paragrafmi */
    }
    
    .message p:first-child {
        margin-top: 0;  /* Odstráni horný margin pre prvý paragraf */
    }
    
    .message p:last-child {
        margin-bottom: 0;  /* Odstráni spodný margin pre posledný paragraf */
    }










    .file-upload-container {
        margin: 20px 0;
        text-align: right;
    }

    .file-upload-label:hover {
        background: #b85438;
        color: #ffffff;
    }

    #pinecone-file-input {
        display: none;
    }

    .progress-container {
        margin: 20px 0;
    }

    .progress-bar {
        width: 100%;
        height: 20px;
        background: #f0f0f0;
        border-radius: 10px;
        overflow: hidden;
    }

    .progress {
        width: 0%;
        height: 100%;
        background: #b85438;
        transition: width 0.3s ease-in-out;
    }

    .progress-text {
        margin-top: 5px;
        text-align: center;
        font-size: 14px;
        color: #666;
    }

    #pinecone-file-list {
        margin-top: 20px;
    }

    #pinecone-files {
        list-style: none;
        padding: 0;
    }

    #pinecone-files li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

    .delete-file {
        color: #dc3545;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
    }

    .delete-file:hover {
        background: #dc35451a;
    }








/* Mobile message overlay 
.mobile-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f5f5f0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: var(--color-gray);
  }*/
















.footer-link {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-gray);
    opacity: 0.7;
    margin-top: 5px;
}

.footer-link a {
    color: var(--color-gray);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}









/* Media query pre mobilné zariadenia 
@media (max-width: 768px) {
    body > *:not(.mobile-message) {
      display: none !important;
    }
    
    .mobile-message {
      display: flex;
    }
  }*/



  

/* Responsive styles */
@media (max-width: 830px) {
    body {
        overflow-x: hidden;
    }
    
    .invoices-table {
        font-size: 12px;
        box-sizing: content-box;
    }
    
    .login-preview-panel {
        display: none !important;
    }
    
    /* Optional: Make the left side take full width on mobile */
    .login-content-panel {
        flex: 1 !important;
        width: 100% !important;
        z-index: 9999;
    }

    .popup-container {
        top: 60px;
        width: 98%;
    }
    
    
}

/* Fix for iPhone X and newer with notch */
@media screen and (max-width: 812px) and (orientation: landscape) {
    .input-container {
        padding-bottom: env(safe-area-inset-bottom, 20px);
        padding-left: env(safe-area-inset-left, 15px);
        padding-right: env(safe-area-inset-right, 15px);
    }
}

/* Ensure proper rendering on iOS */
@media screen and (max-width: 812px) {
    textarea, 
    input[type="text"], 
    select {
      font-size: 16px; /* Prevents zoom on focus on iOS */
    }

    .user-info{
        display: none;
    }

    .footer-link{
        display: none;
    }
    
    /* More breathing room for bottom elements */
    .input-container {
      padding-bottom: calc(env(safe-area-inset-bottom, 15px) + 10px);
    }
    
   
  }

@media (max-width: 768px) {

    /* Kontajner pre payment metódu - zabezpečí vertikálne rozloženie */
    #payment-method-indicator {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* Buttony budú mať rovnakú šírku */
    }
    
    /* Reset marginov pre mobilné zariadenia */
    #payment-method-button,
    #remove-payment-button,
    #invoices-button {
        margin-left: 0; /* Odstráni ľavý margin */
        margin-top: 8px; /* Menší top margin pre kompaktnejší vzhľad */
        width: 100%; /* Buttony budú mať plnú šírku kontajnera */
        max-width: none; /* Odstráni maximálnu šírku */
        min-width: auto; /* Reset min-width */
        box-sizing: border-box; /* Zabezpečí správne počítanie šírky s paddingom */
    }
    
    /* Prvý button (payment-method-button) bude mať menší top margin */
    #payment-method-button {
        margin-top: 15px; /* Trochu viac miesta od textu vyššie */
    }

    .popup-header h3 img {
        margin-left: 1rem;
    }

    /* Sidebar/Conversation History */
    .logout-btn {
        position: fixed;
        top: 10px;
        right: 10px;
        font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        color:#4a3728;
        background-color: transparent;
        border: none;
        padding: 9px 10px;
        border-radius: 50px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.5s;
        box-shadow: none;
      }

      #total-usage {
        display: none;
    }


      #send-btn {
        margin-top: 5px;
        margin-right: 8px;
    }

    .main-controls-group {
        position: fixed;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999; /* Vyššie ako sidebar */
        background-color: var(--color-gray);
        backdrop-filter: blur(10px);
        border-radius: 0 0 12px 12px;
        border: none;
        border-top: none;
        gap: 20px;
        flex-direction: row; /* Zabezpečí buttony vedľa seba */
        align-items: center;
    }

    .conversation-history.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: -1;
        }

    .doc-title {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

  

    .conversation-history {
        left: 0;
        top: 0;
        width: 85%;
        transform: translateX(-100%);
        padding-top: 35px;
        z-index: 1001;
        height: 100vh;
        max-height: 100vh;
        overflow-y: hidden;
        background-color: #ffffff;
        border: 1px solid #3e3e3e28;
        border-bottom: none;
        border-top: none;
    }

    #conversation-list {
        max-height: fit-content;
        margin-top: 100px;
    }

    #loading-gif {
        width: 50px;
    }

    .user-info{
        display: none;
    }

    .footer-link{
        display: none;
    }
    

    .conversation-history.active {
        transform: translateX(0);
    }

    .conversation-item {
        padding: 10px 0;
    }

    .delete-btn {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Chat Container */
    .chat-container,
    .chat-container.sidebar-open {
        margin-left: 0;
        max-width: 100%;
        transition: margin-left 0.2s ease;
    }

    
    .chat-messages {
        margin-top: 50px;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Messages */
    .message {
        max-width: 85%;
        padding: 10px 12px;
    }


     /* Fix sidebar toggle position */
     .sidebar-toggle {
        padding: 9px;
        padding-left: 10px;
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        border: 1px solid #3e3e3e28;
        border-left: none;
        border-top: none;
        border-radius: 0 0 12px 0;
        background: linear-gradient(110deg, var(--color-purple1_1)  0%, var(--color-purple1)  100%);
        z-index: 1002;
    }

    .sidebar-toggle img {
        width: auto;
        height: 20px;
    }

    /* Modifikácia input containera pre počiatočný stav */
    .chat-container:not(.has-messages) .input-container {
        margin-bottom: 0vh;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    /* Input Container */
    .input-container {
        padding: 7px;
        background: #f6f6f6;
        border-top:none;
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
        box-shadow: none;
        width: 100%;
        margin-left: 0;
        position: sticky;
        bottom: 0;
        z-index: 999;
    }

    textarea {
    font-size: 16px;
    width: calc(100% + 40px);
    margin-left: -23px;
    margin-right: 24px;
    scrollbar-width: none;
    background: #ffffff00;
    
  }
  textarea::-webkit-scrollbar {
    display: none;
}

    /* Buttons */
    #upload-btn {
        padding: 0px;
        min-height: 44px;
        min-width: 44px;
    }
   
    

    .submit-btn, 
    .cancel-btn, 
    .file-upload-label,
    .reset-filter-btn,
    #update-billing-info-btn {
        padding: 12px 20px;
        min-height: 44px;
    }

    /* Social Controls */
    .social-controls {
        flex-wrap: wrap;
        justify-content: center;
        
    }

    .popup-content {
        padding-left: 3px;
        padding-right: 3px;
    }

    .social-controls form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .social-controls form > div {
        width: 100%;
        min-width: unset;
    }

    .social-controls select,
    .social-controls input[type="date"] {
        width: 100%;
        font-size: 16px;
        padding: 12px;
        height: auto;
    }

    .social-controls-popup {
        width: calc(100% - 40px);
        left: 20px;
        transform: none;
    }

    /* Stats and Popups */
    .stats-card {
        flex: 1 1 100%;
    }

   .popup-content-payment, .popup-content  {
        width: 100%;
        max-width: 100%;
        /*padding: 15px;*/
        
    }

   
    

    /* Form Controls */
    .form-group input,
    .form-group select,
    .form-group textarea,
    #year-filter,
    #month-filter {
        font-size: 16px;
        padding: 12px;
        height: auto;
    }

    /* Tooltips */
    [data-tooltip]:hover::after {
        display: none;
    }

    /* Close Button */
    .close-btn-usage {
    padding: 15px;
    top: 2px;
    right: 10px;
    z-index: 9999;
    overflow-x: visible !important;
  }

    /* Auth Buttons */
    .auth-buttons {
        position: fixed;
        right:0;
        top: 10px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
    }

    /* File Upload */
    .drop-zone {
        display: none;
        max-width: 95%;
        margin-left: 2.5%;
    }

    .social-controls-icon img {
        width: 20px;
        height: 20px;
    }

    /* Special Icon Styles */
    #analysis, #custom-data-btn, #create-campaign, #social-share, #token-stats-btn, #new-thread-btn {
        margin-top: 3px;
        background-color: transparent;
        border:none;
        box-shadow: none;
        margin-bottom: 5px;
        margin-left: 10px;
        margin-right: 10px;
    }

    #search-btn {
        display: none;
    }

    /* Spoločný hover efekt */
    #analysis:hover,
    #create-campaign:hover, 
    #social-share:hover {
        box-shadow: none;
        border:none;
        background: #f5f5f5;
    }


    .conversation-history h2 {
        padding-top: 50px;
       border:none;
    }

    /* Upravte existujúce štýly pre buttony */
    #record-btn,
    #upload-btn {
        margin-right: 10px;
    }

    #record-btn:hover {
        background: transparent;
        border: none;
        color: #ffffff;
    }

    #upload-btn:hover {
        background: transparent;
        border: none;
        color: #ffffff;
    }

}

/* Small to Medium Phones (up to 576px) */
@media (max-width: 576px) {
    /* Reduce font sizes */
    body {
      font-size: 14px;
    }

    #billing-close-btn, #invoices-close-btn{
        right: 1px
    }
    .popup-container-stats {
        justify-content: flex-start; /* or remove justify-content entirely */
        /* align-items: flex-start; */ /* Optional: also remove vertical centering */
        padding: 20px 10px; /* Add some padding for breathing room */
    }
    
    

    .user-info{
        display: none;
    }

    .footer-link{
        display: none;
    }
    
    .chat-messages {
      padding-left: 8px;
      padding-right: 8px;
    }
    
    /* Make messages wider on small screens */
    .message {
      max-width: 95%;
      padding: 8px 10px;
    }
    
    /* Adjust the input container 
    .input-container {
      width: 98%;
      margin-left: 1%;
      padding: 12px;
    }*/
    
   
    
    /* Adjust user info display */
    .user-name {
      font-size: 14px;
    }
    
    /* Center welcome message 
    .chat-container:not(.has-messages) {
      text-align: justify;
    }*/
  
    
  }

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .chat-messages {
        padding: 10px 5px;
        overflow-x: hidden;
        padding-top: 0px;
    }
   
    .close-btn {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        
        padding: 15px;
        position: absolute;
        right: -30px;
        top: 2px;
        z-index: 999;
    }
   
    .doc-actions {
        margin-top: 8px;
        display: flex;
        gap: 5px;
    }
   
    /* Button text changes for small screens */
     .preview-btn, .analyze-btn {
    font-size: 0 !important;
    padding: 10px 32px;
    min-width: 145px;
  }

   
    .preview-btn::after {
        content: "Zobraziť";
        font-size: 14px;
    }
    .preview-btn[data-state="loading"]::after {
        content: "Načítavam...";
        font-size: 14px;
    }
    .preview-btn[data-state="success"]::after {
        content: "Otvorené";
        font-size: 14px;
    }
    .preview-btn[data-state="error"]::after {
        content: "Chyba";
        font-size: 14px;
    }
    
    .analyze-btn::after {
        content: "Pridať";
        font-size: 14px;
    }
    .analyze-btn[data-state="loading"]::after {
        content: "Pridávam...";
        font-size: 14px;
    }
    .analyze-btn[data-state="success"]::after {
        content: "Pridané";
        font-size: 14px;
    }
    .analyze-btn[data-state="error"]::after {
        content: "Chyba";
        font-size: 14px;
    }
   
    .result-item {
        margin-bottom: 20px;
        padding: 15px;
        border: none;
        border-radius: 15px;
        background: #f6f6f6;
        box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
        width: 100vw;
        box-sizing: border-box;
        margin-left: calc(-50vw + 50%);
    }
   
    .result-content {
        margin-left: 5px;
        text-align: justify;
    }
   
    #search-close-btn {
        right: -13px;
    }
   
    .user-info {
        display: none;
    }
   
    .footer-link {
        display: none;
    }
   
    .message {
        max-width: 90%;
    }
   
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
   
    .form-actions button,
    .form-actions .submit-btn,
    .form-actions .cancel-btn {
        width: 100%;
    }
   
    .stats-container {
        gap: 10px;
    }
   
    /* Remove preview-btn and analyze-btn from this rule since we're handling them separately above */
    .download-btn,
    .save-all-answers-btn {
        font-size: 13px;
        padding: 5px 10px;
    }

    
}



@media (max-width: 400px) {
    .chat-messages {
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 0px;
    }
    
    .message {
        max-width: 96%;
        padding: 8px;
    }
    
  
    
    .conversation-history.active {
        width: 90%;
    }
    
    
    .footer-link {
        font-size: 0.7rem;
        display: none;
    }
    
    #loading-gif {
        width: 66px;
        padding-left: 11px;
        top: 7px;
        position: absolute;
        right: 73px;
    }
}

@media (max-width: 390px) {
    
    .invoices-table {
        font-size: 9px;
        box-sizing: content-box;
    }
    .preview-btn, .analyze-btn {
    font-size: 0 !important;
    padding: 10px 32px;
    min-width: 130px;
  }
}

@media (max-width: 375px) {
    #loading-gif {
        position: absolute;
        right: 66px;
    }
}



.send-email-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple5) 0%, var(--color-purple1) 100%);
    color: #f8f7f4;
    border: none;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin: 4px;
    transition: background-color 0.2s;
}

.send-email-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.predictive-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple5) 0%, var(--color-purple1) 100%);
    color: #f8f7f4;
    border: none;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin: 4px;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
}

.predictive-btn:disabled {
    background: #6c757d00;
    cursor: not-allowed;
    color:#000000;
}



.feedback-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(110deg, var(--color-purple1) 30%, var(--color-blue1)  100%);
    color: #f8f7f4;
    border: none;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin: 4px;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0.2, 0.2, 0.2, 0.2);
}


.collapsible-content {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 12px;
    background: #f8f9fa;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
    /* NOVÉ: Plynulejšie animácie */
    transition: max-height 0.3s ease, padding 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.collapsible-content.collapsed {
    max-height: 0;
    padding: 0;
    border: none;
}

/* NOVÉ: Zabránenie jumpingu počas streamovania */
.collapsible-header {
    cursor: pointer;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
    margin-top: -20px;
    margin-bottom: 0;
    user-select: none; /* NOVÉ: Zabráni označeniu textu */
    position: relative; /* NOVÉ: Stabilita pozície */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* NOVÉ CSS: Pulzujúci efekt pre collapsible headers počas generovania */
.collapsible-header.generating-pulse {
    animation: headerPulse 2s ease-in-out infinite;
  }
  
  @keyframes headerPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
  }


  /* Mode toggle switch */
.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    margin-top: 8px;
}

.mode-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    user-select: none;
}

.mode-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.mode-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #007bff;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.mode-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.mode-toggle input:checked + .mode-toggle-slider {
    background-color: #007bff;
}

.mode-toggle input:checked + .mode-toggle-slider:before {
    transform: translateX(24px);
}

.mode-toggle input:disabled + .mode-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}




