/* Стили для страницы AID Pay */

.aidpay-container {
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Header */
.aidpay-header {
    margin-bottom: 20px;
}

.aidpay-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 4px;
    color: #FFFFFF;
}

.aidpay-subtitle {
    font-size: 14px;
    color: #8E8E93;
    margin: 0;
}

/* Search Bar */
.aidpay-search {
    position: relative;
    margin-bottom: 24px;
}

.aidpay-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8E8E93;
    pointer-events: none;
}

.aidpay-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: #1D2025;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #FFFFFF;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.aidpay-search-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: #22252A;
}

.aidpay-search-input::placeholder {
    color: #8E8E93;
}

.aidpay-tab-hidden {
    display: none;
}

/* Section */
.aidpay-section {
    margin-bottom: 28px;
}

.aidpay-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}

/* Services Grid */
.aidpay-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 100%;
}

/* Service Card */
.aidpay-service-card {
    background: #16181C;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    aspect-ratio: 1;
}

.aidpay-service-card:active {
    transform: scale(0.95);
}

.aidpay-service-card:hover {
    background: #1A1C20;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Coming Soon Overlay */
.aidpay-service-card.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.aidpay-service-card.coming-soon::after {
    content: 'СКОРО';
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #8E8E93;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.aidpay-service-card.coming-soon:active {
    transform: none;
}

/* Service Icon */
.aidpay-service-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 4px;
}

/* Service Name */
.aidpay-service-name {
    font-size: 11px;
    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;
    -webkit-box-orient: vertical;
}

/* Purchase Panel (Bottom Panel) */
.aidpay-purchase-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
}

.aidpay-purchase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: aidpayFadeIn 0.2s ease;
}

.aidpay-purchase-content {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background: #1D2025;
    border-radius: 24px 24px 0 0;
    padding: 0;
    animation: aidpaySlideUp 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
@media (min-width: 600px) {
    .aidpay-purchase-content {
        max-height: 69vh;
    }
}

.aidpay-purchase-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
}

.aidpay-close-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8E8E93;
    transition: all 0.2s ease;
}

.aidpay-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.aidpay-purchase-body {
    padding: 24px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Service Details in Panel */
.aidpay-service-header {
    text-align: center;
    margin-bottom: 24px;
}

.aidpay-service-header-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 16px;
}

.aidpay-service-header-title {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 8px 0;
}

.aidpay-service-header-description {
    font-size: 14px;
    color: #8E8E93;
    margin: 0;
}

/* Amount Input */
.aidpay-amount-section {
    margin-bottom: 20px;
}

.aidpay-amount-label {
    font-size: 14px;
    font-weight: 500;
    color: #B1B4B9;
    margin-bottom: 8px;
    display: block;
}

.aidpay-amount-input-wrapper {
    background: #16181C;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aidpay-amount-currency {
    font-size: 28px;
    font-weight: 600;
    color: #8E8E93;
}

.aidpay-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 28px;
    font-weight: 600;
    color: #FFFFFF;
    padding: 0;
}

.aidpay-amount-hint {
    font-size: 12px;
    color: #8E8E93;
    margin-top: 8px;
}

/* Quick Amount Buttons */
.aidpay-quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.aidpay-quick-amount-btn {
    background: #16181C;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aidpay-quick-amount-btn:hover {
    background: #1D2025;
    border-color: rgba(255, 255, 255, 0.2);
}

.aidpay-quick-amount-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3B82F6;
    color: #3B82F6;
}

/* Info Block */
.aidpay-info-block {
    background: #16181C;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.aidpay-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.aidpay-info-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.aidpay-info-label {
    font-size: 14px;
    color: #8E8E93;
}

.aidpay-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

/* Purchase Button */
.aidpay-purchase-btn {
    width: 100%;
    background: #3B82F6;
    color: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aidpay-purchase-btn:hover {
    background: #2563EB;
}

.aidpay-purchase-btn:active {
    transform: scale(0.98);
}

.aidpay-purchase-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #8E8E93;
    cursor: not-allowed;
}

/* Animations */
@keyframes aidpayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes aidpaySlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Steam Block (Simplified) */
.aidpay-steam-block {
    background: #1D2025;
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aidpay-steam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.aidpay-steam-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aidpay-steam-logo {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    flex-shrink: 0;
}

.aidpay-steam-title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

/* Input Wrapper - новый контейнер для инпутов */
.aidpay-input-wrapper {
    background: #121417;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 6px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

/* Инпут аккаунта - 55% ширины */
.aidpay-input-account {
    width: 55%;
    flex-shrink: 0;
}

/* Инпут суммы - оставшееся место */
.aidpay-input-amount {
    flex: 1;
    min-width: 0;
}

.aidpay-input-wrapper:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    background: #16181C;
}

/* Поле ввода внутри wrapper */
.aidpay-input-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: #FFFFFF;
    padding: 0;
    min-width: 0;
}

.aidpay-input-field::placeholder {
    color: #8E8E93;
}

/* Кнопка информации */
.aidpay-info-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8E8E93;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aidpay-info-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3B82F6;
}

.aidpay-info-btn i {
    font-size: 16px;
}

.aidpay-payment-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

/* Валюта в поле суммы */
.aidpay-amount-currency {
    font-size: 16px;
    font-weight: 600;
    color: #8E8E93;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.aidpay-amount-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    padding: 0;
    min-width: 0;
}

.aidpay-amount-field::placeholder {
    color: #8E8E93;
}

/* Кнопка выбора способа оплаты */
.aidpay-payment-method-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 100%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aidpay-payment-method-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.aidpay-payment-logo {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aidpay-payment-logo img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.aidpay-payment-fee {
    font-size: 12px;
    font-weight: 600;
    color: #FF9900;
}

.aidpay-payment-fee.free {
    color: #4BB543;
}

.aidpay-region-selector {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.aidpay-region-selector:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.aidpay-region-currency {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1;
    display: flex;
    align-items: center;
}

.aidpay-region-arrow {
    color: #8E8E93;
    font-size: 9px;
}

/* Promo and Info Row */
.aidpay-promo-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Promo Button */
.aidpay-promo-btn {
    background: #1d2025;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aidpay-promo-btn:hover {
    background: #16181C;
}

.aidpay-promo-btn i {
    font-size: 16px;
    color: #8E8E93;
}

/* Fee Info */
.aidpay-fee-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.aidpay-vpn-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #3B82F6;
}

.aidpay-vpn-hint.active {
    color: #4BB543;
}

.aidpay-vpn-hint i {
    font-size: 12px;
}

/* No VPN Hint */
.aidpay-no-vpn-hint {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.aidpay-no-vpn-text {
    font-size: 11px;
    color: #8E8E93;
    text-align: right;
    line-height: 1.2;
}

.aidpay-no-vpn-link {
    font-size: 11px;
    color: #3B82F6;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.aidpay-no-vpn-link:hover {
    text-decoration: underline;
}

.aidpay-limit-hint {
    font-size: 11px;
    color: #8E8E93;
}

.aidpay-limit-hint strong {
    color: #FFFFFF;
    font-weight: 600;
}

.aidpay-total-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.aidpay-total-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.aidpay-total-label {
    font-size: 14px;
    font-weight: 500;
    color: #8E8E93;
}

.aidpay-total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
}

.aidpay-vpn-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #3B82F6;
    white-space: nowrap;
}

.aidpay-vpn-badge.active {
    background: rgba(75, 181, 67, 0.1);
    border-color: rgba(75, 181, 67, 0.2);
    color: #4BB543;
}

.aidpay-vpn-badge i {
    font-size: 12px;
}

/* Region selection panel */
.aidpay-region-panel {
    padding: 20px 20px 24px 20px;
}

.aidpay-region-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    text-align: center;
}

.aidpay-region-panel-subtitle {
    font-size: 14px;
    color: #8E8E93;
    margin: 0 0 20px 0;
    text-align: center;
}

.aidpay-region-option {
    background: #16181C;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aidpay-region-option:hover {
    background: #1A1C20;
}

.aidpay-region-option.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.aidpay-region-code {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
}

.aidpay-region-details {
    flex: 1;
}

.aidpay-region-name {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.aidpay-region-subtitle {
    font-size: 13px;
    color: #8E8E93;
}




/* Main toggle */
#aidpay-main-toggle {
    margin-bottom: 10px;
}

/* Tabs */
.aidpay-tab {
    display: block;
}

.aidpay-tab.active {
    display: block;
}

/* Other products section */
.aidpay-other-products {
    margin-top: 0px;
}

.aidpay-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}

/* Products Grid */
.aidpay-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 100%;
}

.aidpay-product-card {
    background: #16181C;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    max-width: 100%;
    max-height: 100%;
}

.aidpay-product-card:active {
    transform: scale(0.95);
}

.aidpay-product-card:hover {
    background: #1A1C20;
    border-color: rgba(255, 255, 255, 0.06);
}

.aidpay-product-icon {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin-bottom: 4px;
}

.aidpay-product-name {
    font-size: 11px;
    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;
    -webkit-box-orient: vertical;
}

/* History */
.aidpay-history-container {
    padding-top: 0;
}

.aidpay-history-item {
    background: #16181C;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.aidpay-history-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.aidpay-history-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.aidpay-history-info {
    flex: 1;
}

.aidpay-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.aidpay-history-service {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.aidpay-history-date {
    font-size: 12px;
    color: #8E8E93;
}

.aidpay-history-amount {
    font-size: 14px;
    font-weight: 600;
    color: #3B82F6;
}

.aidpay-history-code {
    background: #1D2025;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: monospace;
    color: #3B82F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aidpay-history-code-text {
    flex: 1;
}

.aidpay-history-copy-btn {
    background: transparent;
    border: none;
    color: #8E8E93;
    cursor: pointer;
    padding: 4px;
}

.aidpay-history-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8E8E93;
}

/* Button disabled state */
#aidpay .button-blue-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
/* Мобильные устройства (по умолчанию) - 2 колонки */
.aidpay-products-grid,
.aidpay-services-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Планшеты и десктопы (от 500px) - 3 колонки */
@media (min-width: 500px) {
    .aidpay-products-grid,
    .aidpay-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .aidpay-product-icon,
    .aidpay-service-icon {
        width: 40px;
        height: 40px;
    }
    
    .aidpay-product-name,
    .aidpay-service-name {
        font-size: 10px;
    }
    
    .aidpay-product-card,
    .aidpay-service-card {
        padding: 12px 6px;
    }
    
    /* Уменьшаем размеры в Steam блоке для маленьких экранов */
    .aidpay-steam-title {
        font-size: 16px;
    }
    
    .aidpay-input-field,
    .aidpay-amount-field {
        font-size: 14px;
    }
    
    .aidpay-amount-currency {
        font-size: 14px;
    }
    
    .aidpay-payment-method-btn {
        padding: 5px 6px;
    }
    
    .aidpay-payment-logo {
        width: 20px;
        height: 20px;
    }
    
    .aidpay-payment-logo img {
        width: 14px;
        height: 14px;
    }
    
    .aidpay-payment-fee {
        font-size: 11px;
    }
}

/* Tabs */
.aidpay-tab {
    display: none;
}

.aidpay-tab.active {
    display: block;
}

/* Gift Card Styles */
.gift-card-regions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.gift-card-region-option {
    background: #1D2025;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gift-card-region-option:hover {
    background: #22252A;
}

.gift-card-region-option.active {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
}

.gift-card-region-flag {
    font-size: 24px;
    line-height: 1;
}

.gift-card-region-name {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

