/* ========================================
   Modern Wati.io Inspired Design System
   Dark theme with clean, minimal aesthetics
   ======================================== */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a1f2e;
    --bg-elevated: #1e2433;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-primary: #10b981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ========================================
   Copy Animation
   ======================================== */
.base-color {
    color: var(--accent-primary) !important;
}

.copyInput {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.copyInput:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
    transform: translateY(-50%) scale(1.05);
}

.copied::after {
    position: absolute;
    top: -40px;
    right: 0;
    content: "COPIED";
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    color: var(--text-primary);
    background-color: var(--accent-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    opacity: 0;
    animation: showcopied 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes showcopied {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    15% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* ========================================
   Cookie Consent Card
   ======================================== */
.cookies-card {
    width: 420px;
    padding: 24px;
    color: var(--text-primary);
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999999;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookies-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cookies-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.cookies-card__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.cookies-card__close:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.cookies-card__icon {
    color: var(--accent-primary);
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.cookies-card__content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.cookies-card__footer {
    display: flex;
    gap: 12px;
}

.cookies-card.hide {
    bottom: -600px !important;
    opacity: 0;
}

@media (max-width: 767px) {
    .cookies-card {
        width: calc(100% - 32px);
        left: 16px;
        bottom: 16px;
        padding: 20px;
    }
}

/* ========================================
   Input Popup (Password Strength, etc.)
   ======================================== */
.hover-input-popup {
    position: relative;
}

.input-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s;
}

.hover-input-popup:hover .input-popup,
.hover-input-popup:focus-within .input-popup {
    display: block;
}

.input-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: translateX(-50%) rotate(45deg);
}

.input-popup p {
    padding-left: 28px;
    position: relative;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-popup p:last-child {
    margin-bottom: 0;
}

.input-popup p::before {
    position: absolute;
    content: '';
    font-family: 'Line Awesome Free';
    font-weight: 900;
    left: 0;
    top: 2px;
    font-size: 16px;
}

.input-popup p.error {
    color: #ef4444;
}

.input-popup p.error::before {
    content: "\f057";
    color: #ef4444;
}

.input-popup p.success {
    color: var(--accent-primary);
}

.input-popup p.success::before {
    content: "\f058";
    color: var(--accent-primary);
}

/* ========================================
   Payment Gateway Cards
   ======================================== */
.gateway-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.gateway-card:hover {
    border-color: var(--border-hover);
}

.payment-card-title {
    padding: 16px 24px;
    text-align: center;
    background: var(--accent-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
}

.payment-system-list {
    --thumb-width: 100px;
    --thumb-height: 40px;
    --radio-size: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.payment-system-list.is-scrollable {
    max-height: min(400px, 70vh);
    overflow-y: auto;
    padding: 4px;
}

.payment-system-list.is-scrollable::-webkit-scrollbar {
    width: 6px;
}

.payment-system-list.is-scrollable::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.payment-system-list.is-scrollable::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-item:hover {
    background: var(--bg-elevated);
}

.payment-item:has(.payment-item__radio:checked) {
    background: var(--accent-light);
    border-left-color: var(--accent-primary);
}

.payment-item__info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.payment-item__check {
    width: var(--radio-size);
    height: var(--radio-size);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.payment-item:has(.payment-item__radio:checked) .payment-item__check {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
}

.payment-item:has(.payment-item__radio:checked) .payment-item__check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.payment-item__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-item__name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.payment-item__thumb {
    width: var(--thumb-width);
    height: var(--thumb-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.payment-item__thumb img {
    max-width: var(--thumb-width);
    max-height: var(--thumb-height);
    object-fit: contain;
    border-radius: 4px;
}

/* ========================================
   Deposit Information Display
   ======================================== */
.deposit-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.deposit-info:last-child {
    border-bottom: none;
}

.deposit-info__title {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.deposit-info__title .has-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deposit-info__input {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.deposit-info__input-group {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s;
}

.deposit-info__input-group:focus-within {
    border-color: var(--accent-primary);
}

.deposit-info__input-group-text {
    padding: 8px 12px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 13px;
    border-right: 1px solid var(--border-color);
}

.deposit-info__input-group .form--control {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-align: right;
    outline: none;
}

.deposit-info__input-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.deposit-info__input-select:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.total-amount {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.total-amount .deposit-info__title,
.total-amount .deposit-info__input {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========================================
   Purchase Options
   ======================================== */
.purchase-option__card {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.purchase-option-card__item {
    flex: 1;
    padding: 32px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.purchase-option-card__item:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.purchase-option-card__item:has(.method-input:checked) {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.purchase-option-card__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.purchase-option-card__item:has(.method-input:checked) .purchase-option-card__icon {
    color: var(--accent-primary);
}

.purchase-option-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.method-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@media screen and (max-width: 425px) {
    .purchase-option-card__item {
        padding: 24px 12px;
    }
}

/* ========================================
   Skeleton Loaders
   ======================================== */
.skeleton-chat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-chat-item .thumb {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-chat-item .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-chat-item .content div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-chat-item .content .name {
    height: 14px;
    width: 35%;
    background: var(--bg-elevated);
    border-radius: 4px;
}

.skeleton-chat-item .content .text {
    height: 12px;
    width: 75%;
    background: var(--bg-elevated);
    border-radius: 4px;
}

.skeleton-chat-item .content .time {
    height: 10px;
    width: 15%;
    background: var(--bg-elevated);
    border-radius: 4px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    animation: shimmer 1.5s infinite linear;
}

.skeleton-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 12px auto;
}

.skeleton-text {
    height: 16px;
    margin: 12px 0;
}

.skeleton-text-md {
    width: 140px;
    height: 20px;
    margin: 12px auto;
}

.skeleton-text-sm {
    width: 100%;
    height: 14px;
}

.skeleton-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.skeleton-btn {
    width: 80px;
    height: 36px;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   Table Components
   ======================================== */
.table-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.table-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name-short-form {
    width: 100%;
    height: 100%;
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

/* ========================================
   Buttons & Interactive Elements
   ======================================== */
.payment-item__btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-item__btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
}

.coupon-apply-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 12px);
    width: auto;
    min-width: 100px;
    padding: 0 20px;
    background: var(--accent-primary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.coupon-apply-button:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.02);
}

.coupon-apply-button.disable {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

.coupon-apply-button.remove {
    background: #ef4444;
}

.coupon-apply-button.remove:hover {
    background: #dc2626;
}

/* ========================================
   Progress Modal
   ======================================== */
.progressModal .progress {
    width: 100%;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
}

.progressModal .progress-bar {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.progressModal .progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

.progressModal .progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* ========================================
   Select2 Overrides
   ======================================== */
.select2-container .select2-selection--single {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    height: 42px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    line-height: 40px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-dropdown {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.select2-results__option {
    padding: 10px 12px;
    color: var(--text-primary);
}

.select2-results__option--highlighted {
    background: var(--accent-light) !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
}

.select2-container--default .select2-selection--multiple {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-height: 42px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 4px 8px;
}

/* ========================================
   Utility Classes
   ======================================== */
.pointer {
    cursor: pointer;
}

.radius--10px {
    border-radius: 10px;
}

.show-filter {
    display: none;
}

@media (max-width: 767px) {
    .responsive-filter-card {
        display: none;
    }
    .show-filter {
        display: block;
    }
}

.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.button-loader .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   Agent & Miscellaneous Components
   ======================================== */
.agent-info strong {
    font-weight: 600;
    color: var(--text-primary);
}

.agent-info .agent-url {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.agent-info .agent-url:hover {
    text-decoration: underline;
}

.download-document {
    padding: 8px 16px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.download-document:hover {
    background: var(--bg-elevated);
}

.crypto-message,
.crypto-message .gateway-currency {
    color: var(--text-secondary) !important;
}

.template-requirements ul {
    list-style: disc !important;
    padding-left: 20px;
}

.template-requirements ul li {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
    line-height: 1.6;
}

/* ========================================
   ApexCharts Menu Overrides
   ======================================== */
.apexcharts-menu {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
}

.apexcharts-menu-item {
    color: var(--text-primary) !important;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.apexcharts-menu-item:hover {
    background: var(--accent-light) !important;
    color: var(--text-primary) !important;
}

/* ========================================
   Notes & Content Display
   ======================================== */
.note-wrapper__output {
    max-height: 350px !important;
    overflow-y: auto !important;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.note-wrapper__output::-webkit-scrollbar {
    width: 6px;
}

.note-wrapper__output::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.note-wrapper__output::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.plan-details div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-secondary);
}

.plan-details div strong {
    color: var(--text-primary);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .payment-system-list {
        --thumb-width: 80px;
        --thumb-height: 32px;
    }
    
    .payment-item {
        padding: 12px 16px;
    }
    
    .gateway-card {
        padding: 16px;
    }
}