/**
 * WebRTC Phone Styles
 * Стили для модального окна звонков с сайта
 */

/* Модальное окно */
.webrtc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.webrtc-modal.active {
    display: flex;
}

.webrtc-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(38, 211, 0, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(38, 211, 0, 0.1);
    animation: webrtcModalIn 0.3s ease;
}

@keyframes webrtcModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.webrtc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.webrtc-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.webrtc-modal-body {
    padding: 30px;
}

/* Иконка WebRTC возле телефона */
.webrtc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    color: #26d300;
    vertical-align: middle;
    animation: webrtcPulse 2s ease-in-out infinite;
}

@keyframes webrtcPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Опции звонка */
.webrtc-call-options {
    text-align: center;
}

.webrtc-call-header {
    margin-bottom: 30px;
}

.webrtc-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #26d300, #1fa300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #000;
}

.webrtc-contact-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.webrtc-contact-phone {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.webrtc-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.webrtc-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.webrtc-option:hover {
    background: rgba(38, 211, 0, 0.1);
    border-color: rgba(38, 211, 0, 0.3);
    transform: translateX(5px);
}

.webrtc-option-web {
    border-color: rgba(38, 211, 0, 0.3);
}

.webrtc-option-web:hover {
    background: rgba(38, 211, 0, 0.15);
    box-shadow: 0 0 20px rgba(38, 211, 0, 0.2);
}

.webrtc-option-icon {
    width: 48px;
    height: 48px;
    background: rgba(38, 211, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #26d300;
    flex-shrink: 0;
}

.webrtc-option-phone .webrtc-option-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.webrtc-option-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.webrtc-option-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.webrtc-option-text small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Экран согласия */
.webrtc-consent {
    text-align: center;
    padding: 20px 0;
}

.webrtc-consent-icon {
    color: #26d300;
    margin-bottom: 20px;
}

.webrtc-consent h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.webrtc-consent p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    line-height: 1.6;
}

.webrtc-consent-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Экран вызова */
.webrtc-calling {
    text-align: center;
    padding: 40px 0;
}

.webrtc-calling-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.webrtc-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: rgba(38, 211, 0, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: webrtcPulseAnim 1.5s ease-out infinite;
}

.webrtc-pulse:nth-child(2) {
    animation-delay: 0.5s;
}

.webrtc-pulse:nth-child(3) {
    animation-delay: 1s;
}

@keyframes webrtcPulseAnim {
    0% {
        width: 80px;
        height: 80px;
        opacity: 0.8;
    }
    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

.webrtc-calling-status {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.webrtc-calling-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 30px;
}

/* Экран разговора */
.webrtc-incall {
    text-align: center;
    padding: 30px 0;
}

.webrtc-incall-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #26d300, #1fa300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #000;
}

.webrtc-incall-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.webrtc-incall-timer {
    font-size: 2rem;
    font-weight: 300;
    color: #26d300;
    font-family: monospace;
    margin-bottom: 30px;
}

.webrtc-incall-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Экран ошибки */
.webrtc-error {
    text-align: center;
    padding: 20px 0;
}

.webrtc-error-icon {
    color: #ff4757;
    margin-bottom: 20px;
}

.webrtc-error h3 {
    font-size: 1.3rem;
    color: #ff4757;
    margin-bottom: 10px;
}

.webrtc-error p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Экран завершения */
.webrtc-ended {
    text-align: center;
    padding: 20px 0;
}

.webrtc-ended-icon {
    color: #26d300;
    margin-bottom: 20px;
}

.webrtc-ended h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.webrtc-ended p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
}

/* Кнопки */
.webrtc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.webrtc-btn-primary {
    background: linear-gradient(135deg, #26d300, #1fa300);
    color: #000;
}

.webrtc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(38, 211, 0, 0.4);
}

.webrtc-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.webrtc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.webrtc-btn-danger {
    background: #ff4757;
    color: #fff;
}

.webrtc-btn-danger:hover {
    background: #ff3344;
}

.webrtc-btn-round {
    width: 70px;
    height: 70px;
    padding: 0;
    border-radius: 50%;
}

/* Адаптивность */
@media (max-width: 480px) {
    .webrtc-modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        border-radius: 15px;
    }

    .webrtc-modal-body {
        padding: 25px 20px;
    }

    .webrtc-avatar {
        width: 70px;
        height: 70px;
    }

    .webrtc-contact-name {
        font-size: 1.2rem;
    }

    .webrtc-option {
        padding: 15px;
    }

    .webrtc-option-icon {
        width: 44px;
        height: 44px;
    }

    .webrtc-calling-animation {
        width: 100px;
        height: 100px;
    }

    .webrtc-incall-avatar {
        width: 80px;
        height: 80px;
    }

    .webrtc-btn-round {
        width: 60px;
        height: 60px;
    }
}
