/**
 * New Left Menu Styles
 * Стили для левой панели навигации
 */

.new-left-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
    width: 30rem;
    min-width: 0;
    max-width: 30rem;
    box-sizing: border-box;
}

.proxy-service-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.proxy-service-link .service-card {
    margin-bottom: 0;
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #fffaf5, #fff4eb);
    box-shadow: 0 15px 30px rgba(251, 146, 60, 0.18);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.proxy-service-link .service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid #fb923c;
    pointer-events: none;
}

.proxy-service-link:hover .service-card {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(249, 115, 22, 0.22);
}

.proxy-service-icon {
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(249, 115, 22, 0.25));
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}

.proxy-service-icon i {
    font-size: 20px;
}

.proxy-service-title {
    font-size: 16px;
    font-weight: 700;
    color: #9a3412;
}

.menu-section__title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.country-search-wrapper {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.country-search-input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.country-search-clear-btn {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.country-search-clear-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.country-search-clear-btn.is-visible {
    display: flex;
}

.country-search-no-results {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    margin-bottom: 12px;
    display: none;
}

.country-search-no-results.is-visible {
    display: block;
}

.service-search-no-results {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    margin-bottom: 12px;
    display: none;
    width: 100%;
}

.service-search-no-results.is-visible {
    display: block;
}

.service-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.service-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.service-search-input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.service-search-clear-btn {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.service-search-clear-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.service-search-clear-btn.is-visible {
    display: flex;
}

.country-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.country-list--extra {
    margin-top: 12px;
    display: none;
}

.country-list--extra.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.country-item:hover {
    border-color: #fb923c;
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.08);
}

.country-item--selected {
    border-color: #fb923c;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(249, 115, 22, 0.02) 100%);
}

.country-item__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.country-item__main>div {
    flex: 1;
    min-width: 0;
}

.country-flag {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    width: 1.33333333em;
    height: 1em;
    vertical-align: middle;
}

.country-name {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.country-toggle {
    border: none;
    background: #f97316;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
    width: 100%;
}

.country-toggle:hover {
    background: #ea580c;
}

.services-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    min-height: 0;
}

.services-header {
    margin-bottom: 12px;
}

.services-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.services-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.info-card {
    border-radius: 18px;
    padding: 4px 6px;
    background: linear-gradient(135deg, #fffaf5, #fff4eb);
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.18);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid #fb923c;
    pointer-events: none;
}

.info-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #9a3412;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 12px;
}

.info-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(249, 115, 22, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    font-size: 16px;
    flex-shrink: 0;
}

.info-card--notice {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(251, 146, 60, 0.05) 100%);
    border: 1px solid rgba(251, 146, 60, 0.2);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}

.info-card--notice::before {
    border-color: rgba(249, 115, 22, 0.7);
}

.info-card--notice .info-card-content {
    color: #9a3412;
}

.info-card--notice .info-card-icon {
    background: #fff7ed;
    color: #f97316;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.services-list-scrollable {
    max-height: 52rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    margin-bottom: 12px;
}

.services-list-extra {
    display: none;
}

.services-list-extra.is-open {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-toggle {
    border: none;
    background: #f97316;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
    width: 100%;
}

.service-toggle:hover {
    background: #ea580c;
}

.services-list::-webkit-scrollbar {
    width: 6px;
}

.services-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.service-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    padding: 12px 14px;
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.service-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

.service-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.service-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error notification overlay */
.error-notification {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    z-index: 200;
    pointer-events: auto;
}

.error-notification-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ef4444;
    border-radius: 12px;
    padding: 0px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    box-sizing: border-box;
}

.error-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.error-notification-message {
    flex: 1;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.error-notification-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    width: 24px;
    height: 24px;
}

.error-notification-close:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.error-notification-close i {
    font-size: 14px;
}

.service-item:hover {
    border-color: #fb923c;
    box-shadow: 0 6px 14px rgba(249, 115, 22, 0.1);
}

a.service-item {
    cursor: pointer;
}

.service-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    margin-right: 8px;
    position: relative;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.service-arrival-rate {
    position: absolute;
    top: -12px;
    left: -12px;
    background: #10b981;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    z-index: 20;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.service-arrival-rate.low {
    background: #ef4444;
}

.service-arrival-rate.medium {
    background: #f59e0b;
}

.service-name {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.service-info {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-price {
    font-weight: 600;
    color: #f97316;
}

.service-available {
    color: #64748b;
}

.service-price-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    flex-shrink: 0;
}

.service-price-btn {
    min-width: 32px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
}

.service-price-btn:hover {
    background: #f8fafc;
    border-color: #fb923c;
    color: #f97316;
}

.service-price-btn:active {
    transform: scale(0.95);
}

.service-price-display {
    min-width: 60px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #f97316;
    padding: 4px 8px;
    background: #fff7ed;
    border-radius: 6px;
    border: 1px solid #fed7aa;
}

.service-buy-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
    flex-shrink: 0;
    margin-right: 8px;
}

.service-buy-btn:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.service-buy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.service-buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.service-expand-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.service-expand-btn:hover {
    background: #f8fafc;
    border-color: #fb923c;
    color: #f97316;
}

.service-expand-btn.expanded {
    background: #fff7ed;
    border-color: #fb923c;
    color: #f97316;
}

.service-expand-btn.expanded svg {
    transform: rotate(180deg);
}

.service-expand-btn svg {
    transition: transform 0.2s ease;
}

.service-offers {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.service-activation-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.service-activation-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.service-activation-tab:hover {
    background: #f8fafc;
    color: #f97316;
}

.service-activation-tab.active {
    background: #fff7ed;
    color: #f97316;
    border-bottom: 2px solid #f97316;
    margin-bottom: -8px;
    padding-bottom: 10px;
}

.service-activation-tab-label {
    font-weight: 600;
}

.service-activation-tab-count {
    font-size: 11px;
    opacity: 0.8;
}

.service-offer-tab-content {
    margin-top: 8px;
}

.service-offer-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.service-offer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
}

.service-offer-ban-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #94a3b8;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.service-offer-ban-btn:hover {
    color: #64748b;
    transform: scale(1.15);
}

.service-offer-ban-btn:active {
    transform: scale(0.95);
}

.service-offer-ban-btn.banned {
    color: #ef4444;
    animation: banPulse 0.4s ease-out;
}

.service-offer-ban-btn.banned:hover {
    color: #dc2626;
    transform: scale(1.15);
}

.service-offer-ban-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.service-offer-ban-btn:hover i {
    transform: scale(1.1);
}

@keyframes banPulse {
    0% {
        transform: scale(1);
        color: #94a3b8;
    }

    50% {
        transform: scale(1.3);
        color: #ef4444;
    }

    100% {
        transform: scale(1);
        color: #ef4444;
    }
}

@keyframes unbanPulse {
    0% {
        transform: scale(1);
        color: #ef4444;
    }

    50% {
        transform: scale(1.3);
        color: #94a3b8;
    }

    100% {
        transform: scale(1);
        color: #94a3b8;
    }
}

.service-offer-price {
    font-weight: 600;
    color: #f97316;
}

.service-offer-provider {
    color: #475569;
    font-size: 11px;
    font-weight: 500;
}

.service-offer-count {
    color: #64748b;
    margin-left: auto;
}

.service-offer-type-badge {
    padding: 2px 6px;
    background: #fff7ed;
    color: #f97316;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.service-offer-more {
    text-align: center;
    padding: 8px;
    color: #64748b;
    font-size: 11px;
    font-style: italic;
}

.service-item--not-in-list {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fb923c;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.service-item--not-in-list:hover {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.service-item--support {
    margin-top: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.service-item--not-in-list-fixed {
    margin-top: 12px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.support-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.support-link:nth-child(1) {
    background: #D5FD51;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

.support-link:nth-child(1):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.3);
}

.support-link:nth-child(2) {
    background: linear-gradient(135deg, #38bdf8, #3b82f6);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.support-link:nth-child(2):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.3);
}

.support-link:nth-child(3) {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.support-link:nth-child(3):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .new-left-menu {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        border: none;
    }

    .country-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1279px) {
    .new-left-menu {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        border: none;
    }

    #aside {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 1280px) {
    .new-left-menu {
        width: 30rem;
        min-width: 30rem;
        max-width: 30rem;
        box-sizing: border-box;
    }

    #aside {
        width: 30rem !important;
        min-width: 30rem !important;
        max-width: 30rem !important;
        box-sizing: border-box !important;
    }
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

#content {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#content>.container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

#content .flex.flex-col.xl\:flex-row {
    width: 100%;
    box-sizing: border-box;
}

#aside {
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1920px) {
    .new-left-menu {
        width: 30rem;
        min-width: 30rem;
        max-width: 30rem;
    }

    #aside {
        width: 30rem !important;
        min-width: 30rem !important;
        max-width: 30rem !important;
    }

    .country-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .error-notification-content {
        padding: 12px 16px;
        min-width: auto;
    }

    .error-notification-message {
        font-size: 12px;
    }

    .error-notification-icon {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }

    .service-item {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    .services-list,
    .services-list-scrollable,
    .services-list-extra.is-open {
        gap: 2px !important;
        padding-right: 2px !important;
    }

    .service-item .flex.items-center {
        gap: 2px !important;
    }

    .service-icon {
        margin-right: 2px !important;
    }

    .service-buy-btn {
        margin-right: 2px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .service-price-control {
        gap: 2px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        margin-right: 2px !important;
    }

    .service-expand-btn {
        margin-left: 2px !important;
    }

    .service-price-display {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
}