﻿@font-face {
    font-family: 'Iransans';
    src: url('/fonts/Iranian Sans.ttf');
}

* {
    font-family: Iransans;
}

body {
    background: #f5f8fa;
}

/* Pre Loader */
.preloader {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 999;
}

.hidePreloader {
    display: none !important;
}
/* end Pre Loader */

/* public */
.no-shadow:focus {
    box-shadow: none !important;
}
.No-Border {
    border: none !important;
}
.list-group-item {
    background-color: transparent !important;
    padding-inline: 5px !important;
}
.log-Message {
    background-color: white !important;
    padding-inline: 20px !important;
    border-radius: 0px !important;
}
.chat-img {
    width: 100%;
    max-width: 200px;
    border: 2px solid #ddd;
    border-radius: 10px;
}
.btnSend {
    border-radius: 0px 6px 6px 0px !important;
}
.File-DropUp {
    border-radius: 6px 0px 0px 6px;
}
.File-DropUp::after {
    display: none !important;
}
/* end public */

/* Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    direction: rtl;
    margin-bottom: 25px;
}

.section-header::before,
.section-header::after {
    content: "";
    flex: 1;
    border-top: 1px solid #3a7bd5; /* رنگ خط */
    margin: 0 10px; /* فاصله بین متن و خط */
}

.section-header span {
    font-size: 20px;
    font-weight: bold;
    color: #3a7bd5; /* رنگ متن */
    white-space: nowrap;
}
/* End Header */

/* Main */
.navbar {
    border-bottom: 2px solid #34e89e !important;
}

.main-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.room-btn {
    width: 100%;
    border-radius: 10px;
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    transition: all 0.2s ease-in-out;
}

.room-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.site-footer {
    font-size: 13px;
    color: #666;
}
/* End Main */

/* Chatroom styles */
#messagesList {
    position: relative;
    height: 70vh;
    overflow-y: auto;
    padding: 5px;
    background: #34e89e;
    background: -webkit-linear-gradient(to right, #0f3443, #34e89e);
    background: linear-gradient(to right, #0f3443, #34e89e);
    border: 1px solid #ddd;
    border-radius: 0px;
}

#scrollToBottomBtn {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 10;
    opacity: 0.85;
    width: 30px;
    border-radius: 100px;
}

.date-divider {
    text-align: center;
    color: gray;
    font-weight: bold;
    border-radius: 0px !important;
    padding: 5px;
}

.date {
    background: rgba(255,255,255,0.6);
    display: inline-block
}

.my-message {
    text-align: right;
}

.their-message {
    text-align: left;
}

.message-bubble {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 15px;
    margin: 5px;
    max-width: 70%;
    word-wrap: break-word;
    background-color: #dcf8c6;
}

@media (min-width: 768px) {
    .message-bubble {
        max-width: 350px;
    }
}

.my-message .message-bubble {
    background-color: #dcf8c6;
    color: #000;
}

.their-message .message-bubble {
    background-color: #ffffff;
    color: #000;
    border: 1px solid #ccc;
}

.message-header {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.message-text {
    font-size: 0.9rem;
    text-align: right;
    overflow: hidden;
}

.message-footer {
    font-size: 0.6rem;
    margin-top: 5px;
}

.message-edited {
    font-size: 0.6rem;
    margin-top: 5px;
}

.my-message .message-actions {
    position: absolute;
    bottom: 10px;
    left: -30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.their-message .message-actions {
    position: absolute;
    bottom: 10px;
    right: -30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    /*display: none;*/
}

.their-message .delete-btn,
.their-message .edit-image-btn,
.their-message .edit-btn {
    display: none;
}

.message-bubble:hover .message-actions,
.message-bubble:focus .message-actions {
    opacity: 0.9;
}

.message-actions button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    font-size: 14px;
    background-color: #f0f0f0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.message-actions button:hover {
    background-color: #e0e0e0;
}

/* Reply */
.highlight {
    background-color: #f1f1f1 !important;
    transition: background-color 0.5s;
}

.reply-preview {
    background: rgba(52,232,158,0.2);
    backdrop-filter: blur(10px);
    padding: 5px;
    padding-inline: 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    color: gray;
    font-size: x-small;
    position: relative;
    text-align: right;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.reply-preview-side {
    background-color: #34e89e;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 5px;
    height: 100%
}

#replyText {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Audio Player */
.audio-player {
    background-color: white;
    width: 200px;
    border: 1px solid #ccc;
    padding: 5px 5px;
    border-radius: 10px;
    text-align: center;
    direction: rtl;
}

.voice-progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.voice-progress {
    height: 100%;
    width: 0%;
    background: #2196f3;
    transition: width 0.1s linear;
    position: absolute;
    right: 0;
}

.audio-filename {
    width: 135px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr
}

/* Video Player */
.message-video {
    max-width: 300px;
}

/* File */
.file-message {
    width: 200px;
    border: 1px solid #ccc;
    text-align: left;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#typingIndicator {
    font-size: 0.9rem;
    color: #888;
    padding-left: 10px;
    font-style: italic;
}

.rainbow-button {
    position: relative;
    padding: 4px 4px;
    background: transparent;
    color: black;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1;
    border-radius: 20px;
    /*overflow: hidden;*/
}

.rainbow-button::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, red, orange, yellow, green, cyan, blue, violet, red);
    z-index: -1;
    border-radius: 10px;
    background-size: 300% 300%;
    animation: borderAnimation 6s linear infinite;
}

.rainbow-button::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: white;
    border: none;
    z-index: -1;
    border-radius: 6px;
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.sendMessageSection {
    height: 55px;
    background-color: white;
}

#recordButton {
    border: none;
    border-radius: 0px 6px 6px 0px !important;
}
/* End Chatroom styles */

/* login */
.login-Section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c2e59c; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #64b3f4, #c2e59c); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #64b3f4, #c2e59c); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

.LoginForm {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
    max-width: 400px;
    padding: 20px;
    backdrop-filter: blur(999px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.login-header {
    font-size: medium !important;
}

.login-inputs {
    background-color: transparent;
    border: 1px solid var(--mainBlack)
}

.login-inputs:focus {
    background-color: transparent;
}

.RegisterOfLogin-Footer {
    font-size: small
}
/* end login */

/* Register Form */
.RegisterForm {
    border: 1px solid #ccc;
    border-radius: 15px;
    overflow: hidden;
    margin: 10px;
}

.RegisterFormMain {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.RegisterFormMain input {
    background: rgba(255,255,255,0.7);
}

.RegisterFormSide {
    background: #34e89e;
    background: -webkit-linear-gradient(to right, #0f3443, #34e89e);
    background: linear-gradient(to right, #0f3443, #34e89e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.RegisterFormSide-Content {
    background: rgba(255,255,255,0.3);
    display: inline-block;
    border-radius: 10px;
    padding: 10px;
}
/* end Register Form */

/* Management Styles */
.Console-Details {
    background: #00d2ff; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #3a7bd5, #00d2ff); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #3a7bd5, #00d2ff); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3);
    height: 100px;
    transition: ease-in 0.3s;
}

.Console-Details:hover, .Console-Details:focus {
    transform: translateY(-5px);
}
/* End Management Styles */