
/* style-call.css */


.profile-modal-call-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #18b800;
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 100;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100px;
    height: 100px;
    margin: 20px auto 0px;
    justify-content: center;
    flex-direction: column;
}

.profile-modal-call-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.profile-modal-call-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.profile-modal-call-button img {
    width: 36px;
}

.profile-modal-call-button svg {
    width: 60px;
    height: 40px;
    vertical-align: middle;
}

/* Стили для модального окна уведомления о входящем звонке */
.incoming-call-notification {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #272727;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 15px;
    gap: 10px;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateX(100%);
    opacity: 0;
}

.incoming-call-notification.active {
    display: flex;
    transform: translateX(0);
    opacity: 1;
    backdrop-filter: blur(8px);
}

.incoming-call-notification .notification-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.incoming-call-notification .notification-header span {
    font-size: 20px;
    color: #ffffff;
}

.incoming-call-notification .notification-close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
    display: none; /* Изначально скрыта, активируется JS */
}

.incoming-call-notification .notification-close-button.active {
    display: block; /* Показываем, когда звонок завершен/отклонен */
}

.incoming-call-notification .notification-close-button:hover {
    color: #555;
}

.incoming-call-notification .notification-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.incoming-call-notification .notification-avatar-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0; /* Фоновый цвет для аватара */
    box-shadow: 0px 0px 12px 0px #fccaff, 0px 0px 49px 0px #ff86f0, 0px 0px 65px 0px #b984ff;
}

.incoming-call-notification .notification-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.incoming-call-notification .notification-initial-letter {
    font-size: 40px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.incoming-call-notification .notification-text {
    font-size: 13px;
    color: #00ff68;
    margin: 0;
    text-align: center;
}

.incoming-call-notification .notification-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.incoming-call-notification .notification-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 130px;
    padding: 10px 15px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.incoming-call-notification .accept-button {
    background-color: #18b800;
    color: white;
}


.incoming-call-notification .accept-button img {
    transform: rotate(0deg);
    animation-name: wiggle;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
@keyframes wiggle {
  0% {transform: rotate(0deg);}
  10% {transform: rotate(-20deg);}
  20% {transform: rotate(20deg);}
  30% {transform: rotate(-20deg);}
  40% {transform: rotate(0deg);}
  100% {transform: rotate(0deg);}

}

.incoming-call-notification .accept-button:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.incoming-call-notification .reject-button {
    background-color: #ff2312; /* Красный */
    color: white;
}

.incoming-call-notification .reject-button img{
    transform: rotate(90deg);
}

.incoming-call-notification .reject-button:hover {
    background-color: #ff5061;
    transform: translateY(-1px);
}

.incoming-call-notification .notification-button svg {
    width: 20px;
    height: 20px;
}


/* Стили для модального окна активного звонка (перекрывает все) */
.active-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #001d4787;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    backdrop-filter: blur(6px);
}

.active-call-overlay.active {
    opacity: 1;
    visibility: visible;
}

.active-call-content {
    background: linear-gradient(#572c55, hsl(271 24% 28% / 1), hsl(203 15% 11% / 1));
    color: #000000;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    width: -webkit-fill-available;
    height: 90%;
    max-width: 450px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    animation: fadeInScale 0.4s ease-out forwards;
    flex-wrap: nowrap;
    justify-content: space-between;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9);}
    to { opacity: 1; transform: scale(1);}
}

.active-call-overlay .call-close-button {
    background: none;
    font-size: 50px;
    transition: color 0.2s ease, transform 0.2s ease;
    display: none;
    transform: rotate(0deg);
    padding: 0;
    right: 24px;
    top: 20px;
}

.active-call-overlay .call-close-button.active {
    display: block;
}

.active-call-overlay .call-close-button:hover {
    color: #ff6b6b;
    transform: rotate(90deg);
}

.active-call-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}

.active-call-avatar-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #7f97b1;
    box-shadow: 0px 0px 12px 0px #fccaff, 0px 0px 49px 0px #ff86f0, 0px 0px 65px 0px #b984ff;
}

.active-call-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.active-call-initial-letter {
    font-size: 60px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.active-call-username {
    font-size: 2.2em;
    margin: 0;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    FONT-WEIGHT: 100;
}

.active-call-status {
    font-size: 18px;
    color: #e98dff;
    margin: 0;
    font-weight: 100;
}

.active-call-timer {
    FONT-WEIGHT: 100;
    font-size: 46px;
    color: #e98dff;
    margin: 0px;
}

.active-call-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    z-index: 1;
}







.call-control-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ffffff2b;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;}
.call-control-button:hover {
    transform: translateY(-2px);
    background: #000;}
.call-control-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);}
.call-control-button img{
    width: 30px;}
.call-control-button svg {
    width: 30px;
    height: 30px;}
.call-control-button.end-button {
    background-color: #ff2312;}
.call-control-button.end-button:hover {
    background-color: #d32f2f;}
.call-control-button.call-again-button {
    background-color: #4CAF50;}/* Повтор звонка */
.call-control-button.call-again-button:hover {
    background-color: #45a049; } /* Повтор звонка при наведении */
.call-control-button.mute-button.active {
    background-color: #f39c12;}
.call-control-button.mute-button.muted {
    background-color: #0000001a}
.call-control-button.mute-button.muted svg {
    color: #000;}








    
/* video control buttons */
.call-control-button.camera-button {
    /* background-color: #00000030; */ 
}
.call-control-button.camera-button img {
    width: 30px;}
.call-control-button.camera-button.off {
    background-color: #0000001a;}
.call-control-button.camera-button.off svg {
    color: #000;}
.call-control-button.camera-button.active {
    background-color: #f39c12;}

#remoteAudio {
    display: none;
}


/* Адаптивность для маленьких экранов */
@media (max-width: 600px) {
    .incoming-call-notification {width: fit-content;}
    .incoming-call-notification .notification-buttons {width: 100%;}
    .incoming-call-notification .notification-button {width: min-content; min-width: 140px;}
    /* .active-call-content {width: 75%;} */
    .active-call-username {font-size: 30px;}
    .active-call-timer {font-size: 50px;}
    .active-call-controls {flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 15px;}
    .call-control-button { font-size: 12px;}
    .call-control-button svg {width: 24px; height: 24px;}
}
