/* Стили для системы управления VPN */

.vpn-management-container {
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
}
@media (min-width: 600px) {
    .vpn-management-container {
        max-height: 69vh;
    }
}

/* Переключатель режимов */
#vpn-management-toggle {
    margin-bottom: 12px;
}

/* Контент для режима "Установка" */
.vpn-installation-content {
    padding: 0;
}

.vpn-installation-title {
    font-size: 20px;
    font-weight: 600;
    color: #DCDDE0;
    margin: 0 0 8px 0;
    text-align: center;
}

.vpn-installation-subtitle {
    font-size: 14px;
    color: #B1B4B9;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Карточка активного ключа */
.vpn-active-key-card {
    background: #1F2024;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.vpn-key-status {
    font-size: 12px;
    color: #B1B4B9;
    margin-bottom: 12px;
}

.vpn-key-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vpn-key-id {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

.vpn-key-plan {
    background: #3B82F6;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.vpn-key-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.vpn-time-icon {
    width: 16px;
    height: 16px;
}

.vpn-time-text {
    font-size: 14px;
    color: #4BB543;
    font-weight: 500;
}

.vpn-device-icon {
    position: absolute;
    top: 20px;
    right: 20px;
}

.vpn-device-img {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

.install-key-card {
    background: #16181C;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 12px;
}

.install-key-card-title-text {
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    color: #DCDDE0;
    padding-bottom: 5px;
}

.install-key-card-subtitle-text {
    font-weight: 400;
    font-size: 11px;
    line-height: 100%;
    text-align: center;
    color: #B1B4B9;
    padding-bottom: 12px;
}

/* Поле с ссылкой */
.vpn-link-container {
    margin-bottom: 0;
}

.vpn-link-field {
    background: #1F2024;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    
    padding-top: 0px;
    padding-bottom: 0px;
    padding-right: 5px;
    padding-left: 16px;
    border-radius: 24px;

}

.vpn-link-text {
    max-width: calc(100% - 72px);
    background: #ffffff00;
    outline: none;
    border: 0;
    font-size: 14px;
    color: #DCDDE0;
    word-break: break-all;
    flex: 1;

    background: #ffffff00;
    outline: none;
    border: 0;
}

.vpn-copy-btn {
    background: none;
    border: none;
    /* padding: 8px; */
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;

    
    padding-top: 2px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 0px;
    border-radius: 50px;

}

.vpn-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vpn-copy-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.vpn-qr-btn {
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    padding-top: 2px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 0px;
    border-radius: 50px;
}

.vpn-qr-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vpn-qr-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    fill: currentColor;
    color: #DCDDE0;
}

.addon-tooltip-note {
    opacity: 0.7;
    font-size: 10px;
}

.vpn-time-recalc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 24px;
}

.vpn-time-recalc-col {
    flex: 1;
    text-align: center;
}

.vpn-time-recalc-label {
    font-size: 13px;
    color: #9aa0a6;
    margin-bottom: 8px;
}

.vpn-time-recalc-value {
    font-size: 16px;
    font-weight: 600;
}

.vpn-time-recalc-value--neutral {
    color: #DCDDE0;
}

.vpn-time-recalc-value--positive {
    color: #4CAF50;
}

.vpn-time-recalc-value--negative {
    color: #F44336;
}

.vpn-time-recalc-arrow {
    font-size: 20px;
    color: #9aa0a6;
}

.vpn-time-recalc-hint {
    color: #9aa0a6;
}

.vpn-change-panel {
    padding: 24px;
}

.vpn-change-protocol-chip {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.vpn-change-protocol-chip-label {
    color: #fff;
    font-weight: 600;
}

.vpn-change-title {
    margin-top: 7px;
    font-size: 22px;
    font-weight: 500;
    color: #DCDDE0;
}

.vpn-change-subtitle {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 400;
    color: #B1B4B9;
}

.vpn-change-location-line {
    margin-top: 8px;
    color: #B1B4B9;
    font-size: 14px;
}

.vpn-change-recalc-card {
    margin-top: 18px;
    background: linear-gradient(62deg, #1D2025 50%, rgba(139, 139, 148, 0.3));
    border-radius: 20px;
    padding: 20px;
}

.vpn-change-recalc-title {
    text-align: center;
    color: #B1B4B9;
    font-size: 13px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpn-change-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vpn-change-actions--spaced {
    margin-top: 20px;
}

.vpn-change-state {
    padding: 24px;
    text-align: center;
}

.vpn-change-state-title {
    color: #DCDDE0;
    font-size: 18px;
}

.vpn-change-state-spinner-wrap {
    margin-top: 20px;
}

.vpn-change-state-icon {
    width: 64px;
}

.vpn-change-state-icon--success {
    color: #3D9966;
}

.vpn-change-state-icon--error {
    opacity: 0.5;
}

.vpn-change-state-headline {
    margin-top: 7px;
    font-size: 22px;
    font-weight: 500;
    color: #DCDDE0;
}

.vpn-change-state-subtitle {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 400;
    color: #B1B4B9;
}

.vpn-change-state-note {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #8B8D92;
}

.vpn-change-debug {
    margin-top: 16px;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #9aa0a6;
}

.vpn-change-debug-summary {
    cursor: pointer;
    color: #DCDDE0;
    margin-bottom: 8px;
}

.vpn-change-debug-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.vpn-change-close-btn {
    margin-top: 20px;
}

.vpn-renew-key-card {
    position: relative;
    margin-bottom: 16px;
}

.vpn-renew-protocol-badge {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.vpn-renew-status {
    width: 100%;
    font-size: 12px;
    padding: 0 0 2px 0;
}

.vpn-renew-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vpn-renew-title {
    margin: 0;
}

.vpn-renew-devices-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

.vpn-renew-features {
    margin-bottom: 0;
}

.vpn-renew-feature-dot {
    width: 4px;
    height: 4px;
    background: #ec9b03;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.vpn-renew-currency-main {
    font-size: 24px;
    font-weight: 600;
    color: #DCDDE0;
}

.purchase-bar__old {
    margin-left: 6px;
    color: #9aa0a6;
    text-decoration: line-through;
}

.vpn-renew-discount-text {
    color: #9aa0a6;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.vpn-renew-legacy-warning {
    margin-top: 8px;
    color: #ffb300;
    font-size: 12px;
    line-height: 1.4;
}

.vpn-renew-button-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.vpn-renew-price-card {
    margin-top: 18px;
    background: linear-gradient(62deg, #1D2025 50%, rgba(139, 139, 148, 0.3));
    border-radius: 20px;
    padding: 20px;
}

.vpn-renew-price-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.vpn-renew-price-main {
    font-size: 32px;
    font-weight: 600;
    color: #DCDDE0;
}

.vpn-renew-price-old {
    color: #9aa0a6;
    text-decoration: line-through;
    font-size: 20px;
}

.vpn-renew-balance-after {
    margin-top: 16px;
    text-align: center;
    color: #B1B4B9;
    font-size: 14px;
}

.vpn-renew-balance-after-value {
    color: #DCDDE0;
}

.vpn-renew-icon-low-balance {
    opacity: 0.35;
}

.vpn-renew-wallet-card {
    min-height: 150px;
    border-radius: 20px;
    padding: 20px;
    margin-top: 18px;
    background: linear-gradient(62deg, #1D2025 50%, rgba(139, 139, 148, 0.3));
}

.vpn-renew-wallet-title {
    color: #B1B4B9;
    font-size: 14px;
    font-weight: 400;
}

.vpn-renew-wallet-currency {
    font-size: 24px;
    font-weight: 500;
    color: #B1B4B9;
}

.vpn-renew-wallet-value {
    font-size: 24px;
    font-weight: 500;
    color: #DCDDE0;
}

.vpn-renew-wallet-action {
    margin-top: 18px;
}

.vpn-renew-close-secondary {
    margin-top: 12px;
}

.vpn-renew-legacy-message {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #B1B4B9;
    line-height: 1.4;
}

.legacy-hint-blink {
    color: #fff;
    animation: hintBlink 2s ease-in-out infinite;
}

@keyframes hintBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.vpn-purchase-info-icon {
    opacity: 0.8;
}

.vpn-purchase-warning-text {
    color: #B1B4B9;
    font-size: 14px;
    line-height: 1.5;
}

.vpn-purchase-warning-accent {
    color: #DCDDE0;
}

.vpn-purchase-promo-note {
    margin-top: 12px;
    text-align: center;
    color: #8B8D92;
    font-size: 12px;
}

.vpn-purchase-balance-after {
    margin-top: 8px;
}

.vpn-purchase-info-box {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.vpn-purchase-info-box-text {
    font-size: 14px;
    color: #B1B4B9;
    line-height: 1.4;
}

/* Переключатель приложения/инструкция */
.vpn-instruction-toggle {
    display: flex;
    background: #1F2024;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.vpn-instruction-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    color: #B1B4B9;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.vpn-instruction-btn--active {
    background: #3B82F6;
    color: #FFFFFF;
}

/* Инструкции */
.vpn-instructions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vpn-instruction-item {
    background: #1F2024;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}

.vpn-instruction-item:hover {
    background: #2A2D32;
}

.vpn-instruction-item span {
    font-size: 14px;
    color: #DCDDE0;
    font-weight: 500;
}

.vpn-chevron-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.vpn-instruction-item.expanded .vpn-chevron-icon {
    transform: rotate(180deg);
}

/* Контент для режима "Смена тарифа" */
.vpn-tariff-change-content {
    padding: 0;
}

.vpn-tariff-change-title {
    font-size: 20px;
    font-weight: 600;
    color: #DCDDE0;
    margin: 0 0 8px 0;
    text-align: center;
}

.vpn-tariff-change-subtitle {
    font-size: 14px;
    color: #B1B4B9;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Карточка текущего тарифа */
.vpn-current-tariff-card {
    background: #1F2024;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* Доступные тарифы */
.vpn-available-tariffs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vpn-tariff-card {
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.vpn-tariff-card--medium {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
}

.vpn-tariff-card--max {
    background: linear-gradient(135deg, #E65100, #F57C00);
}

.vpn-tariff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vpn-tariff-name {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.vpn-tariff-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
}

.vpn-tariff-badge--top {
    background: #DC4E41;
}

.vpn-tariff-features {
    margin-bottom: 20px;
}

.vpn-tariff-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vpn-feature-icon {
    width: 16px;
    height: 16px;
}

.vpn-feature-text {
    font-size: 14px;
    color: #FFA500;
    font-weight: 500;
}

.vpn-tariff-description {
    font-size: 14px;
    color: #B1B4B9;
    margin-bottom: 12px;
}

.vpn-tariff-duration {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vpn-duration-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.vpn-duration-text {
    font-size: 14px;
    color: #B1B4B9;
}

.vpn-tariff-change-btn {
    background: #FFFFFF;
    color: #333333;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.vpn-tariff-change-btn:hover {
    background: #F5F5F5;
    transform: translateY(-1px);
}

.vpn-tariff-icon {
    position: absolute;
    top: 20px;
    right: 20px;
}

.vpn-tariff-img {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

#manage-key-card{
    padding-top: 7px;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

/* Стили для блоков VPN приложений - простой дизайн с иконками */
.vpn_app_icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 8px 0;
}

.vpn-app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 24px;
    position: relative;
    /* Фиксируем высоту чтобы все иконки были одинакового размера */
    min-height: 90px;
    justify-content: flex-start;
}

.vpn-app-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Стили для плашек */
.vpn-app-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Рекомендуем - зеленый градиент (хорошо видно) */
.vpn-app-badge--recommended {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: #FFFFFF;
}

/* Pro - фиолетовый градиент */
.vpn-app-badge--pro {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    color: #FFFFFF;
}

/* Альтернативное - серая рамка */
.vpn-app-badge--alternative {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #B1B4B9;
}

/* Обратная совместимость и классы для контейнеров */
.vpn-app-icon--featured,
.vpn-app-icon--recommended,
.vpn-app-icon--pro,
.vpn-app-icon--alternative {
    position: relative;
    padding: 12px 8px;
    margin: 0;
}

.vpn-app-icon--featured:hover,
.vpn-app-icon--recommended:hover,
.vpn-app-icon--pro:hover,
.vpn-app-icon--alternative:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.vpn-app-icon__image {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    object-fit: cover;
    /* background: #2A2D32; */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.vpn-app-icon:hover .vpn-app-icon__image {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vpn-app-icon__name {
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Активное состояние контейнера приложений */
.vpn_app_icons--active {
    animation: vpnFadeIn 0.3s ease-in;
}

@keyframes vpnFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Состояние загрузки */
.vpn_app_icons--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.vpn-apps-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vpn-apps-loader__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    animation: vpnSpin 1s linear infinite;
}

.vpn-apps-loader__text {
    color: #B1B4B9;
    font-size: 14px;
}

@keyframes vpnSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщение об отсутствии приложений */
.vpn-apps-empty {
    text-align: center;
    padding: 40px 20px;
    color: #B1B4B9;
}

.vpn-apps-empty__icon {
    width: 48px;
    height: 48px;
    opacity: 0.3;
    margin: 0 auto 16px;
}

.vpn-apps-empty__text {
    font-size: 16px;
    margin-bottom: 8px;
}

.vpn-apps-empty__subtext {
    font-size: 14px;
    opacity: 0.7;
}

/* Адаптивность */
@media (max-width: 320px) {
    .vpn_app_icons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .vpn-app-icon__name {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .vpn-management-container {
        padding: 16px;
    }
    
    .vpn-key-id {
        font-size: 20px;
    }
    
    .vpn-tariff-name {
        font-size: 18px;
    }
    
    .vpn-tariff-change-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .vpn_app_icons {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .vpn-app-icon__image {
        width: 50px;
        height: 50px;
    }
    
    .vpn-app-icon__name {
        font-size: 11px;
    }
}

/* Скрываем кнопку перевыпуска ссылки */
#manage-reset-link-btn {
    display: block;
}
