.chat-link-list {
    list-style: none;
    padding: 0;
}

.chat-link-item {
    margin: 15px 0;
    margin-left: 10px;
}

.chat-link {
    display: flex;
    align-items: center;
    gap: 20px;
    width: fit-content;
    max-width: 100%;
    padding: 15px 30px;
    color: black;
    text-decoration: none;
    border-radius: 16px;
    font-weight: bold;
    font-size: 20px;
    transition: background 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* лёгкая тень */
}

.chat-link:hover {
    background: #D3D3D3;
}

.chat-link img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.start-dialog-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #00b894;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
    transition: background-color 0.3s ease;
}

.start-dialog-button:hover {
    background-color: #019874;
}

.Izbran{
    display: inline-block;
    padding: 12px 30px;
    margin-top: 20px;
    background-color: #00b894;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    list-style-type: none;
    margin-left: 10px;
}

.Izbran:hover {
    background-color: #019874;
}
.chat-preview {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.chat-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-name {
    font-weight: bold;
    font-size: 18px;
}

.chat-time {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
    margin-left: 12px;
}

.chat-last-message {
    font-size: 15px;
    color: #667;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 5px;
}

.unread-badge {
    background-color: #00b894;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
.chat-link-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-link-item form {
    margin: 0;
}

.chat-link-item .btn-danger {
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 4px 6px;
    font-size: 16px;
    background: none;
    border: none;
    color: grey;
    cursor: pointer;
}

.chat-link-item:hover .btn-danger {
    opacity: 1;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: fadeInScale 0.3s ease-in-out;
}

.modal-box p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: space-around;
}

.confirm-btn,
.cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.confirm-btn {
    background-color: #dc3545;
    color: white;
}

.confirm-btn:hover {
    background-color: #c82333;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.chat-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #f9f9f9;
    max-width: 400px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chat-search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-search-form input[type="search"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.chat-search-form button {
    padding: 10px 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-search-form button:hover {
    background-color: #0056b3;
}

.chat-card {
    position: relative;
}

.delete-btn {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px; /* уменьшенная иконка */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: #dc3545;
}



@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@media (max-width: 768px) {
    .start-dialog-button {
        bottom: 60px;
    }

    .delete-btn {
        position: absolute;
        bottom: 8px;
        right: 12px;
        background: transparent;
        border: none;
        color: #aaa;
        cursor: pointer;
        font-size: 14px; /* уменьшенная иконка */
        opacity: 0.4;
        transition: opacity 0.3s ease;
    }
}