/* Styl bazowy z z7b */
body {
    background-color: #acac90;
}

.navbar {
    min-height: 40px;
    font-size: 15px;
}

.sekcja1 {
    height: auto;
    width: auto;
    text-align: left;
    border-color: rgba(200, 0, 255, 0.31);
    border-width: 1px;
    margin-top: 45px;
    margin-left: 5px;
    margin-right: 1px;
    margin-bottom: 5px;
}

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 21px;
    font-size: 11px;
    color: rgb(34, 255, 0);
    background-color: #8a8a70;
    border: solid;
    border-width: 1px;
    border-color: rgb(64, 255, 0);
    text-align: center;
    z-index: 1000;
}

.register-card {
    max-width: 460px;
    margin: 5rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

.form-signin .checkbox {
    font-weight: 400;
}

.form-signin .form-floating:focus-within {
    z-index: 2;
}

.form-signin input[type="text"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ============================================ */
/* Style dla komunikatora z9 */
/* ============================================ */

.chat-container {
    margin-top: 70px;
    margin-bottom: 120px;
    padding: 0 15px;
}

.messages-container {
    background: #d4d4b8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 20px;
    max-height: 55vh;
    overflow-y: auto;
    border: 1px solid #9a9a7e;
}

.message-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
}

.message-item:hover {
    background: #e9ecef;
}

/* Wiadomości wysłane (zielone, po prawej) */
.message-item.sent {
    background: #d4edda;
    border-left: none;
    border-right: 4px solid #28a745;
    margin-left: 20%;
}

.message-item.sent .message-user {
    color: #28a745;
}

/* Wiadomości odebrane (niebieskie, po lewej) */
.message-item.received {
    background: #e3f2fd;
    border-left: 4px solid #0d6efd;
    margin-right: 20%;
}

.message-item.received .message-user {
    color: #0d6efd;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-user {
    font-weight: 600;
    color: #0d6efd;
}

.message-time {
    font-size: 12px;
    color: #6c757d;
}

.message-content {
    word-wrap: break-word;
}

.message-media img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-media img:hover {
    transform: scale(1.02);
}

.message-media video {
    max-width: 400px;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 10px;
}

.message-media audio {
    margin-top: 10px;
    width: 100%;
    max-width: 350px;
}

/* Formularz wysyłania */
.send-form-container {
    position: fixed;
    bottom: 25px;
    left: 0;
    right: 0;
    background: #c4c4a8;
    border-top: 2px solid #9a9a7e;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.send-form {
    max-width: 900px;
    margin: 0 auto;
}

/* Animacja nowej wiadomości */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item.new {
    animation: fadeIn 0.3s ease-out;
}

/* Status ładowania */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading-indicator .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}