/* General page styles */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.btn {
    border-radius: 10px; /* Ustaw dowolne zaokrąglenie, np. 10px */
}



/* Padding for content to avoid overlapping with the fixed navbar */
.container {
    padding-top: 140px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}


/* Table styling for admin/user pages */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

table th {
    background-color: #f2f2f2;  /* Zachowanie subtelnego, jasnoszarego tła */
    color: #333;  /* Ciemniejszy kolor tekstu dla czytelności */
    padding: 15px;
    font-size: 1.1rem;  /* Delikatne powiększenie tekstu */
    font-weight: 600;  /* Lekkie wytłuszczenie */
    text-align: center;
    border-bottom: 2px solid #ddd;  /* Jasne obramowanie dla odróżnienia nagłówka od treści */
}



/* Table cells */
table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center; /* Center horizontally */
    vertical-align: middle; /* Center vertically */
}

/* Alternate row colors for better readability */
table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #e3f2fd;  /* Jasnoniebieski na hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  /* Cień podniesienia */
    transition: all 0.2s ease-in-out;  /* Płynne przejście */
}

table tr:active {
    background-color: #cce4ff;  /* Błękitny, który na chwilę zaznacza wiersz */
}


/* Custom styling for badge status with fixed width */
.badge-status {
    display: inline-block;
    width: 150px;
    text-align: center;
    padding: 10px 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
}

/* Set fixed width for the last column (status column) */
table td:last-child {
    width: 150px;
}

/* Allegro entry styling */
.allegro-entry {
    margin-bottom: 10px;
}

.allegro-entry span {
    display: inline-block;
    min-width: 150px;
}

/* Integrated/Not Integrated status */
.integrated {
    color: green;
    font-weight: bold;
}

.not-integrated {
    color: red;
    font-weight: bold;
}

/* Styl dla sekcji wiadomości */
.message-container {
    display: flex;
    flex-direction: column-reverse;
    height: 70vh;
    overflow-y: auto;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
}

/* Message bubble styling */
.message {
    margin: 12px 0;
    padding: 15px;
    padding-bottom: 30px;
    border-radius: 20px;
    max-width: 60%;
    position: relative;
    word-wrap: break-word;
}

/* Message from the user */
.from-user {
    background-color: #e5e5ea;
    align-self: flex-start;
    margin-left: 0;
    margin-right: auto;
}

/* Message from me */
.from-me {
    background-color: #007aff;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
}

/* Content of the message */
.message-content {
    font-size: 1rem;
    line-height: 1.5;
}

/* Author in the top left corner for user messages */
.message-author {
    font-size: 0.9rem;
    color: #007aff;
    margin-bottom: 5px;
    text-align: left;
}

/* Date in the bottom right corner */
.message-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    position: absolute;
    bottom: 5px;
    right: 10px;
}

.from-user .message-info {
    color: #6c757d;
}

/* ==================== Stylizacja formularza wiadomości ==================== */

/* Kontener formularza wiadomości */
.input-container {
    display: flex;
    align-items: flex-end; /* Wyrównanie przycisku do dołu */
    padding: 10px;
    border-radius: 25px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box; /* Uwzględnienie paddingu w szerokości */
}

/* Grupa dla pola tekstowego i przycisku */
.input-group {
    display: flex;
    width: 100%; /* Zajmuje całą szerokość kontenera */
    justify-content: space-between;
}

/* Zaokrąglone pole tekstowe */
.input-group textarea {
    border: round;
    border-radius: 25px;
    padding: 15px;
    width: 100%;
    resize: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* Uwzględnia padding w szerokości */
    flex-grow: 1; /* Powoduje, że pole tekstowe zajmuje maksymalną dostępną przestrzeń */
    min-height: 50px; /* Minimalna wysokość pola tekstowego */
    margin-right: 10px; /* Przestrzeń między polem tekstowym a przyciskiem */
}

/* Styl dla focus w textarea */
.input-group textarea:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* Kontener dla przycisku */
.input-group-append {
    display: flex;
    align-items: flex-end; /* Wyrównanie przycisku do dołu */
    justify-content: flex-end;
}


/* Zmiana koloru przycisku na ciemniejszy szary na hover */

#userMessage {
    resize: none; /* Wyłączenie ręcznego skalowania */
    overflow: hidden; /* Ukrycie przewijania w przypadku nadmiaru tekstu */
    border-radius: 25px; /* Zaokrąglenie krawędzi */
}


#notification-count {
    position: absolute !important; 
    top: -10px !important;  /* Przesunięcie nad dzwoneczek */
    right: -10px !important; /* Przesunięcie na prawo od dzwoneczka */
    background: #007BFF !important;  /* Niebieski kolor informacyjny */
    color: white !important; 
    border-radius: 50% !important;  /* Spraw, aby kształt był zawsze okrągły */
    width: 24px !important;  /* Ustaw stałą szerokość */
    height: 24px !important; /* Ustaw stałą wysokość */
    display: flex !important;  /* Użyj Flexbox do wyśrodkowania */
    justify-content: center !important;  /* Wyśrodkuj poziomo */
    align-items: center !important;  /* Wyśrodkuj pionowo */
    font-size: 0.8rem !important; 
    text-align: center !important; 
    z-index: 1001 !important;  /* Zapewnij, że kółko jest nad dzwoneczkiem */
}


/* Ustawienie ikony dzwoneczka w prawym górnym rogu */
#notification-bell {
    position: fixed !important;  /* Ustawienie pozycji stałej */
    top: 20px !important;        /* Odległość od górnej krawędzi */
    right: 20px !important;      /* Odległość od prawej krawędzi */
    display: none;               /* Ukryj dzwoneczek na początku */
    z-index: 1000;               /* Zawsze na wierzchu */
}

/* Wygląd przeczytanych notyfikacji */
.notification-read {
    opacity: 0.6;
}

/* Ustawienie ikony wyszukiwania w conversation_log */
/* Stylizacja ikon wyszukiwania dla Rozmówca i Konto */
#labelLogin img,
#labelAccount img {
    width: 18px; /* Rozmiar ikony */
    height: 18px; /* Rozmiar ikony */
    margin-right: 7px; /* Odstęp między ikoną a tekstem */
    /* Opcjonalnie: jeśli używasz SVG z currentColor, możesz zmieniać kolor poprzez CSS */
    /* W przeciwnym razie kolor musi być ustawiony w samym pliku SVG */
}

/* Hover efekty dla etykiet Rozmówca i Konto */
#labelLogin:hover,
#labelAccount:hover {
    cursor: pointer;
    color: #358eed; /* Zmiana koloru tekstu na hover */
}

#labelLogin:hover img,
#labelAccount:hover img {
    /* Jeśli ikona jest SVG z currentColor, zmień kolor poprzez CSS */
    /* Przykład zmiany koloru ikony za pomocą filtru */
    filter: brightness(0) saturate(100%) invert(35%) sepia(100%) saturate(500%) hue-rotate(180deg);
}

/* Stylizacja pól wyszukiwania dla Rozmówca i Konto */
#searchLogin,
#searchAccount {
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

#searchLogin:focus,
#searchAccount:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Subtelny efekt focus */
}

/* Responsive width for notifications dropdown */
.notifications-dropdown-menu {
    width: 75vw;
    max-width: 75vw;
}

/* Ensure long notification titles wrap on small screens */
.notifications-dropdown-menu .notification-title,
.notifications-dropdown-menu .notification-message {
    white-space: normal;
    word-break: break-word;
}

.notifications-dropdown-menu .notification-item .d-flex {
    flex-wrap: wrap;
}

/* Responsive scaling for Google reCAPTCHA on small screens */
@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* ================= Responsive remarketing messages table ================= */
/* Override generic table rules for the remarketing messages */
#remarketingMessagesTable td:last-child {
    width: auto; /* allow icon column to shrink */
}

@media (max-width: 576px) {
    /* Hide table header to save space on small screens */
    #remarketingMessagesTable thead {
        display: none;
    }

/* Stack login and message vertically */
#remarketingMessagesTable tr {
    display: block;
    border-bottom: 1px solid #dee2e6;
    padding: 4px 0;
}

#remarketingMessagesTable td {
    display: block;
    border: none;
    padding: 4px 8px;
    width: 100%;
}

#remarketingMessagesTable td:first-child {
    font-weight: bold;
    padding-bottom: 0;
}

#remarketingMessagesTable td:nth-child(2) {
    padding-top: 0;
}

#remarketingMessagesTable td:last-child {
    text-align: right;
    padding-top: 4px;
}

}

/* --- FIX na długie notyfikacje w dropdown bell --- */
.notifications-dropdown-menu {
    width: 90vw;
    max-width: 90vw;
    min-width: 220px;
    max-height: 65vh;   /* żeby nie zalało całego ekranu na mobile */
    overflow-y: auto;   /* scroll dla długich list */
    overflow-x: hidden; /* nigdy nie poziomy scroll! */
}

.notifications-dropdown-menu .dropdown-item-text,
.notifications-dropdown-menu .notification-title,
.notifications-dropdown-menu .notification-message,
.notifications-dropdown-menu .dropdown-item {
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 1em;
    padding-right: 10px;
    padding-left: 10px;
    /* Jeśli jakieś notyfikacje mają marginy lub paddings, możesz zmniejszyć */
}

/* Jeśli coś jest w <div class="d-flex"> – wymuś wrap */
.notifications-dropdown-menu .notification-item .d-flex {
    flex-wrap: wrap !important;
}
.notifications-dropdown-menu .d-flex {
    flex-wrap: wrap !important;
}

/* Wrap account info in configuration panel on small screens */
.account-info {
    flex-wrap: wrap;
    word-break: break-word;
}
