/* Кнопка в правом верхнем углу */
.popup-trigger {
    position: fixed;
    top: 105px;
    right: 10px;
    width: 150px;
    height: 35px;
    background-color: #313b57;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
}

.popup-trigger svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.popup-trigger svg path {
    fill: #FFFFFF !important;
}

.popup-trigger:hover {
    background: #252e46;
    transform: scale(1.1);
}

.popup-trigger span {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* Overlay для всплывающего окна */
.popup-overlay_inst {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay_inst.active {
    display: flex;
    opacity: 1;
}

/* Контент всплывающего окна */
.popup-content_inst {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 620px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.popup-overlay_inst.active .popup-content_inst {
    transform: scale(1);
}

/* Заголовок popup */
.popup-header_inst {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.popup-header_inst h3 {
    margin: 0;
    color: #313b57;
    font-size: 20px;
}

.popup-close_inst {
    cursor: pointer;
    font-size: 28px;
    color: #999;
    line-height: 1;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: #333;
}

.popup_text_inst p strong {
    font-weight: 600;
}

/* Тело popup */
.popup-body_inst {

}

.popup_text_inst {
    padding: 0 20px;
}

.popup-body_inst img {
    margin-bottom: 15px;
}

.popup-body_inst img:last-child {
    margin-bottom: 0;
}

.popup_text_inst p {
    color: #313b57;
    font-size: 16px;
    line-height: 18px;
    margin: 15px 0 15px 0;
}

.popup_text_inst h4 {
    font-size: 20px;
    margin: 20px 0 0 0;
}

.popup_text_inst h5 {
    font-size: 16px;
    margin: 20px 0 0 0;
}

/* Кнопки в popup */
.popup-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.popup-btn-primary {
    background: #007cba;
    color: white;
}

.popup-btn-primary:hover {
    background: #005a87;
}

.popup-btn-secondary {
    background: #f1f1f1;
    color: #333;
}

.popup-btn-secondary:hover {
    background: #ddd;
}

/* Сообщения */
.success-message,
.error-message {
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.popup-close_inst.footer_close {
	cursor: pointer;
    font-size: 16px;
    color: #FFFFFF;
    background: #313b57;
    padding: 10px 20px;
    transition: all 2s linear;
    border-radius: 5px;
}

.close_footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
/* Адаптивность */
@media (max-width: 768px) {
    .popup-trigger {
        top: 55px;
        right: 10px;
        width: 50px;
        height: 50px;
        border-radius: 50px;
    }
    
    .computer-text {
        display: none !important;
    }
    
    .popup-trigger span {
        font-size: 12px;
    }
    
    .popup-trigger svg {
        margin-right: 0;
    }
    
    .popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header,
    .popup-body {
        padding: 15px;
    }
    
    .popup-buttons {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
    }
    
    .popup_text_inst ul {
        font-size: 16px;
    }
    
    .popup-body_inst img {
        max-width: 100%;
    }
}