/* styles.css */

body {
    background-color: #f2f2f2; /* Light Gray */
    color: #333; /* Dark Gray */
    margin-bottom: 70px;
}

.header-bar,
.navbar,
#contacts-sidebar {
    border-bottom: 1px solid #4caf50; /* Green */
}

.header-bar {
    border-top: 1px solid #4caf50; /* Green */
}

.navbar {
    height: 70px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #263238; /* Dark Greenish Gray */
    border: 1px solid #4caf50; /* Green */
}

.navbar-brand {
    font-weight: bold;
    font-size: 24px;
    color: #f2f2f2; /* Light Gray */
}

.navbar-brand img {
    height: 50px;
    margin-right: 10px;
}

.navbar-nav .nav-link {
    font-size: 18px;
    color: #f2f2f2; /* Light Gray */
}

.navbar-stats-container {
    background-color: #4caf50; /* Green */
    color: #f2f2f2; /* Light Gray */
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 70px;
    width: 100%;
    z-index: 999;
    border-bottom: 1px solid #4caf50; /* Green */
}

.navbar-stats-text {
    font-weight: bold;
    font-size: 20px;
}

#contacts-sidebar {
    background-color: #455a64; /* Dark Gray (slightly bluish tint) */
    color: #f2f2f2; /* Light Gray */
    padding: 20px;
    border-radius: 0;
    position: fixed;
    top: 130px;
    bottom: 0;
    left: 0;
    width: 500px; /* Increased width */
    overflow-y: auto;
    border: 1px solid #4caf50; /* Green */
}

.list-group-item {
    background-color: #37474f; /* Dark Greenish Gray */
    border-color: #455a64; /* Dark Gray (slightly bluish tint) */
    color: #f2f2f2; /* Light Gray */
    cursor: pointer;
}

.list-group-item.contact-item {
    background-color: #37474f; /* Dark Greenish Gray */
    border-color: #455a64; /* Dark Gray (slightly bluish tint) */
    color: #f2f2f2; /* Light Gray */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
}

.selected {
    background-color: #252525;
}

.contact-info {
    flex: 1;
}

.contact-name,
.contact-address {
    margin-bottom: 5px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn {
    margin-top: 5px;
}

.list-group-item.blocked {
    background-color: #888; /* Gray */
    color: #333; /* Dark Gray */
}

.list-group-item:hover {
    background-color: #414341; /* Green */
    border-color: #282928; /* Green */
}

.form-control {
    background-color: #fff; /* White */
    color: #333; /* Dark Gray */
    border: 1px solid #ccc; /* Light Gray */
}

.form-control:focus {
    background-color: #fff; /* White */
    color: #333; /* Dark Gray */
    border-color: #455a64; /* Dark Gray (slightly bluish tint) */
    box-shadow: none;
}

.btn-primary {
    background-color: #4caf50; /* Green */
    border-color: #4caf50; /* Green */
    color: #f2f2f2; /* Light Gray */
}

.btn-primary:hover {
    background-color: #18521a; /* Green */
    border-color: #063f08; /* Green */
}

#message-area {
    padding: 20px;
    margin-left: 500px;
    margin-top: 130px;
    margin-bottom: 100px;
}

.message-card {
    position: relative;
    margin-bottom: 10px;
    max-width: 70%; /* Adjust the maximum width of the speech bubbles */
}

.message-card::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: #f2f2f2; /* Light Gray */
    left: -20px;
    transform: translateY(-50%);
}

.message-card.sent-by-you {
    margin-left: auto;
    text-align: right;
    align-self: right;
}

.message-card.sent-by-you::before {
    left: auto;
    right: -20px;
    border-right-color: transparent;
    border-left-color: #f2f2f2; /* Light Gray */
}

.message-sender {
    font-weight: bold;
    margin-bottom: 5px;
}

#message-input-container {
    position: fixed;
    bottom: 0;
    left: 500px;
    width: calc(100% - 500px);
    background-color: #f2f2f2; /* Light Gray */
    border-top: 1px solid #ccc; /* Light Gray */
    padding: 10px;
    display: flex;
    align-items: center;
}

#message-input {
    flex: 1;
    margin-right: 10px;
}

#send-button {
    width: auto;
}

/* Additional CSS for modals */
.modal {
    text-align: center;
}

.modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px; /* Adjusts for spacing */
}

.modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
    width: 30%; 
    max-width: 800px;
}

/* CSS for Edit button */
.edit-contact-btn {
    margin-right: 5px;
    background-color: #208431; 
    border-color: #104d1d; 
    color: #fff; /* White */
}

.edit-contact-btn:hover {
    background-color: #104219; 
    border-color: #0d3c18; 
}

.edit-contact-btn[disabled] {
    pointer-events: none;
    opacity: 0.6; 
}

.del_btn {
    margin-left: 5px;
    background-color: #f44336; 
    border-color: #d32f2f; 
    color: #fff; /* White */
}

#helpModal .modal-dialog {
    width: 90%;
    max-width: none; /* Override Bootstrap's default */
}