.friend {
    padding: 2px;
    white-space: nowrap;
}

.friend_select {
    color: #e66060;
}

.friend.newmail::before {
  content: "📩";
  margin-right: 0.3em;
}

.modemail,.modechat { display: none !important; }
.modemail.active,.modechat.active { display: block !important; }

:root {
    --clr-h-titles: #fff;
    --clr-html-text: #ddd;
    --clr-dark-text: #555;
    --clr-gray-green: #ecfcf3;
    --clr-body-bg-light: rgb(79, 124, 143);
    --clr-body-bg-dark: #342e62;
    --clr-overlay-bg: #100f1d94;
    --clr-gray-light: #f7f7f7;
    --clr-red: #FF4C4C;
    --clr-red-hovered: #FF1F1F ;
    --clr-green-light: #b8fdd9;
    --clr-green-light-hover: #96fcc7;
    --clr-blue: #007BFF;
    --clr-blue-dark: #0056b3;

    --size_border-radius-large: 50px;
    --size_border-radius-big: 32px;
    --size_border-radius-medium: 16px;
    --size_border-radius-small: 8px;
    --font-size-normal: 14px;
    --font-size-small: 12px;

    --size-max-width-mobile: 300px;
}

body {
    margin: 0;
    padding: 0; /*4vh 4vw; нельзя иначе прокрутка появляется*/
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--clr-body-bg-light), var(--clr-body-bg-dark));
    font-family: Unbounded, sans-serif;
    color: #ddd;
    font-size: var(--font-size-normal);
}
h1, h2, h3, h4, h5, h6 {
    margin: 10px 0 20px;
    /*color: white;*/
}
a {
    color: var(--clr-html-text);
    text-decoration: none;
}
a:hover{
    text-decoration: underline;
}
button{
    font-family: inherit;
}
.small-txt{
    font-size: .6em;
}
.flex-row-center{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}
.section, .vsection{
    display: flex;
    flex-direction: column;
    gap: 2%;
    margin: 10px;
}
.section{
    /* width: 100%; */
    flex-direction: row;
    overflow: hidden;
}
.vsection{
    gap: 2vw;
}
.bordered-block, .bordered-button, .bordered-button-dark{
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--size_border-radius-large);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 10px 15px;
}

.bordered-button, .bordered-button-dark{
    cursor: pointer;
    transition: transform 0.3s ease;
}
.bordered-button:hover, .bordered-button-dark:hover{
    transform: scale(1.01);
}
.bordered-button-dark{
    /* border: 1px solid rgba(0, 0, 0, 0.2); */
    background: var(--clr-body-bg-light);
    color: #ddd;
}
.bordered-block{
    padding: 15px 20px;
    border-radius: var(--size_border-radius-medium);
    /* margin: 10px; */
    background-color: rgba(255, 255, 255, 0.1);
}
.bordered-block .block-title{
    margin-bottom: 10px;
}
.bg-light{
    background: #fff;
    color: var(--clr-dark-text) !important;
}
.bg-dark{
    background: var(--clr-body-bg-light) !important;
}

.menu-icon {
    width: 50px;
    height: 50px;
}


/* BUTTONS  */

.action-btn, .action-btn-big{
    display: inline-block;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--clr-dark-text);
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--size_border-radius-big);
    background-color: white;
    border: none;
    box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .05), 0 1px 2px 0 rgba(0, 0, 0, .08);
    cursor: pointer;
}
.action-btn-big{
    padding: 10px 20px;
    font-size: var(--font-size-normal);
}
.action-btn:hover, .action-btn-big:hover {
    box-shadow: 0 0 1px 1px var(--clr-body-bg-dark);
    0 0 5px 1px var(--clr-body-bg-light);
    transform: scale(1.01);
}
.btn-green{
    background-color: var(--clr-green-light);
    color: #333;
}
.btn-green:hover{
    background-color: var(--clr-green-light-hover);
}
.icon-btn{
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 30px;
    padding: 20px 30px;
    padding-left: 60px;
}


.activity-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.activity-list li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-footer {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin: 1rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 5px;
}

.menu-list li {
    cursor: pointer;
    /* transition: transform 0.3s ease, font-size 0.3s ease; */
    transition: transform 0.1s ease;
}
.menu-list li:hover {
    transform: scale(1.005);
    /* font-size: 1.1em; */
}

/* TABLE  */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}
table th, table td {
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
table th {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: bold;
}


/* POPUP WINDOW */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr-overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    /*visibility: hidden;*/
    opacity: 0;
    transition: /*visibility 0s,*/ opacity 0.3s ease;
    z-index: 1000;
}
.popup-overlay.active {
    /*visibility: visible;*/
    opacity: 1;
}





.transparent-overlay.active {
    background: rgba(0, 0, 0, 0.7);
    transition: visibility 0s, opacity 0.3s ease;
}
.popup-window{
    position: relative;
    border-radius: var(--size_border-radius-medium);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /*max-width: var(--size-max-width-mobile);*/
    /* width: 100%; */
    min-width: 300px;
max-height: 90vh;
max-width: 95vw;
overflow: auto;
}

.transparent-overlay.active .popup-window{
    /* background: var(--clr-body-bg-light); */
    opacity: 1;
    z-index: 1001;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--clr-red);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--size_border-radius-small);
    cursor: pointer;
}
.popup-close:hover {
    background: var(--clr-red-hovered);
}


/* FORMS  */

.form-field input, textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--size_border-radius-small);
    box-sizing: border-box;
}
.form-field .required-label::after {
    content: " *"; 
    color: var(--clr-red); 
    font-weight: bold; 
    margin-left: 5px; 
}
.form-field{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.form-field label {
    width: 150px; 
    margin-right: 10px; 
    font-weight: bold;
}
form button{
    margin-top: 1rem;
    /* width: 100%; */
}

/* FILE DROP ZONE  */

.file-drop-zone {
    border: 2px dashed var(--clr-blue);
    border-radius: var(--size_border-radius-small);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.file-drop-zone:hover {
    background-color: var(--clr-gray-green);
    border-color: #0056b3;
}

.file-drop-zone.dragover {
    background-color: var(--clr-gray-green);
    border-color: var(--clr-blue);
}

.file-upload-trigger {
    color: var(--clr-blue);
    text-decoration: underline;
    cursor: pointer;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background-color: var(--clr-gray-light);
    margin-bottom: 5px;
    border-radius: 5px;
}

.file-item button {
    padding: 2px 8px;
    background-color: var(--clr-red);
    color: white;
    border: none;
    border-radius: var(--size_border-radius-small);
    cursor: pointer;
    font-size: var(--font-size-small);
}

.file-item button:hover {
    background-color: var(--clr-red-hovered);
}


/* ID styles */

#register-popup .popup-window{
    max-height: 90vh;
}

#identityForm{
    max-width: 600px;
}

#register-submit-btn{
    width: 100%;
}

#top-menu{
    justify-content: space-between;
    align-items: center;
}

#user-info-btn{
    cursor: pointer;
}

.user-avatar img{
    width: 35px; 
    transition: transform 0.3s ease;
}
.user-avatar img:hover {
    transform: scale(1.1); 
}

#user-info-block {
    display: none;
    position: fixed;
    top: 120px;
    right: 1vw;
    /* width: 400px; */
    background: var(--clr-body-bg-dark);
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: var(--size_border-radius-medium);
    z-index: 1002;
}
.action-btns{
    justify-content: flex-end;
}

#left-menu{
    min-width: 200px;
    max-width: 40%;
}

#new-msg-btn{
    background-image: url('../images/write_pen_icon.webp');
}

#new-msg-popup .popup-window{
    max-width: 600px;
}
#add-recipient-popup .popup-window{
    max-width: 500px;
    max-height: 75vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#add-recipient-popup button{
    cursor: pointer;
}
#file-upload{
    background-image: url('../images/upload_file_icon.webp');
}
#new-msg-send{
    background-image: url('../images/send_icon.webp');
}
#new-msg-btns-block{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
#main-block{
    /* min-width: var(--size-max-width-mobile); */
    padding: 0 10px;
}

/********************************/
/*********** MOBILE  ************/
/********************************/

@media screen and (max-width: 768px) {
    .mobile{
        display: block;
    }
    body{
        padding: 1vh 1vw;
    }
    .fullscreen{
        display: none
    }
    #register-popup .popup-window{
        max-width: 100%;
        max-height: 80vh;
        overflow-y: auto;
    }
    #left-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 75%;
        height: 100%;
        background: var(--clr-body-bg-dark);
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }

    .icon-button {
        background: none;
        border: none;
        cursor: pointer;
    }
}

/********************************/
/********* FULL SCREEN **********/
/********************************/
@media screen and (min-width: 769px) {
    .mobile{
        display: none;
    }
    .fullscreen{
        display: block;
    }
    #left-menu {
        display: flex;
    }
    #menu-toggle, #user-toggle {
        display: none;
    }
}