/* Refill Panel - Morrhollow Terminal Style */
/* Matches Hollowcore Hub V2 design language */

.refill-container {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-lg, 8px);
    padding: var(--hc-pad-md, 8px);
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.4) 0%,
        rgba(30, 41, 59, 0.5) 100%);
}

.refill-container::-webkit-scrollbar {
    width: 6px;
}

.refill-container::-webkit-scrollbar-track {
    background: transparent;
}

.refill-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.refill-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Refill Sections */
.refill-section {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.refill-section:not(.disabled):hover {
    border-color: rgba(147, 197, 253, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 12px rgba(147, 197, 253, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.refill-section.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-md, 6px);
    padding: var(--hc-pad-md, 8px);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.8) 0%,
        rgba(51, 65, 85, 0.9) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.section-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0.3));
}

.section-header h3 {
    flex: 1;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-gold-accent, rgba(212, 175, 55, 0.9));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow:
        0 0 10px rgba(147, 197, 253, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.8);
}

.recommended-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.3) 0%,
        rgba(22, 163, 74, 0.4) 100%);
    border: 1px solid rgba(34, 197, 94, 0.5);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: rgba(134, 239, 172, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Section Body */
.section-body {
    padding: var(--hc-pad-lg, 12px);
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-lg, 8px);
}

.section-description {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(203, 213, 225, 0.85);
}

/* Balance Section */
.balance-section .balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--hc-gap-md, 6px);
}

.balance-section .balance-grid .offchain-item {
    grid-column: 1 / -1; /* Span full width */
    background: linear-gradient(135deg,
        rgba(157, 78, 221, 0.15) 0%,
        rgba(157, 78, 221, 0.25) 100%);
    border-color: rgba(157, 78, 221, 0.3);
}

.balance-item.clickable-balance {
    cursor: pointer;
    transition: all 0.2s ease;
}

.balance-item.clickable-balance:hover {
    background: linear-gradient(135deg,
        rgba(157, 78, 221, 0.3) 0%,
        rgba(157, 78, 221, 0.4) 100%);
    border-color: rgba(157, 78, 221, 0.6);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 12px rgba(157, 78, 221, 0.4);
}

.balance-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--hc-pad-md, 8px);
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.6) 0%,
        rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
}

.balance-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.balance-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--hc-gold-accent, rgba(212, 175, 55, 0.9));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-family: 'IBM Plex Mono', monospace;
}

/* Wallet Info */
.wallet-info {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md, 6px);
    padding: var(--hc-pad-md, 8px);
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.6) 0%,
        rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
}

.wallet-address {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.wallet-addr {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wallet-balance-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: var(--hc-pad-sm, 6px);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-label {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.7);
    font-weight: 600;
}

.token-amount {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #E5E7EB;
    font-weight: 600;
}

/* Transfer Form */
.transfer-form {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-lg, 8px);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.transfer-token-select {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: #e2e8f0;
    padding: 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.transfer-token-select:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.amount-input-row {
    display: flex;
    gap: var(--hc-gap-sm, 4px);
    align-items: center;
}

.transfer-amount-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    padding: 10px;
    font-size: 13px;
    color: #f8fafc;
    font-family: 'IBM Plex Mono', monospace;
    transition: all 0.15s ease;
}

.transfer-amount-input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}

.max-btn {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.9);
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.max-btn:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: rgba(250, 204, 21, 0.95);
    background: rgba(51, 65, 85, 0.75);
}

.available-label {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.8);
    font-style: italic;
}

/* Fee Estimation */
.fee-estimate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    margin-top: 4px;
}

.fee-label {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.fee-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(147, 197, 253, 0.9);
    font-weight: 600;
}

/* Fee Warning */
.fee-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg,
        rgba(217, 119, 6, 0.15) 0%,
        rgba(180, 83, 9, 0.2) 100%);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 4px;
    margin-top: 4px;
    font-size: 10px;
    color: rgba(253, 186, 116, 0.9);
    line-height: 1.4;
}

.warning-icon {
    font-size: 12px;
    flex-shrink: 0;
}

/* Buttons */
.primary-btn {
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg,
        rgba(250, 204, 21, 0.9),
        rgba(212, 175, 55, 1));
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.btn-icon {
    font-size: 16px;
}

.secondary-btn {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secondary-btn:hover {
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(250, 204, 21, 0.95);
    background: linear-gradient(135deg,
        rgba(51, 65, 85, 0.7) 0%,
        rgba(30, 41, 59, 0.8) 100%);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--hc-pad-sm, 6px) 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    color: rgba(203, 213, 225, 0.85);
    line-height: 1.5;
}

.feature-icon {
    color: rgba(34, 197, 94, 0.8);
    font-weight: 600;
    flex-shrink: 0;
}

/* Wallet Install Links */
.wallet-install-links {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-sm, 4px);
    margin-top: var(--hc-gap-md, 6px);
}

.wallet-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    color: rgba(147, 197, 253, 0.9);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.wallet-link:hover {
    border-color: rgba(147, 197, 253, 0.4);
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.2) 0%,
        rgba(59, 130, 246, 0.3) 100%);
    color: rgba(191, 219, 254, 0.95);
    box-shadow: 0 0 8px rgba(147, 197, 253, 0.2);
    transform: translateX(4px);
}

/* Help Section */
.help-section .section-body {
    gap: var(--hc-gap-md, 6px);
}

.help-text {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(203, 213, 225, 0.85);
}

.help-text strong {
    color: var(--hc-gold-accent, rgba(212, 175, 55, 0.9));
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .refill-container {
        padding: var(--hc-pad-sm, 6px);
        gap: var(--hc-gap-md, 6px);
    }

    .balance-grid {
        grid-template-columns: 1fr;
    }

    .section-header h3 {
        font-size: 11px;
    }

    .recommended-badge {
        font-size: 8px;
        padding: 2px 6px;
    }

    .primary-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .secondary-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Loading State */
.refill-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.refill-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: rgba(212, 175, 55, 0.9);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Status Messages */
.refill-status {
    padding: var(--hc-pad-md, 8px);
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: var(--hc-gap-md, 6px);
}

.refill-status.success {
    background: linear-gradient(135deg,
        rgba(22, 101, 52, 0.35) 0%,
        rgba(21, 128, 61, 0.55) 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: rgba(134, 239, 172, 0.95);
}

.refill-status.error {
    background: linear-gradient(135deg,
        rgba(69, 10, 10, 0.45) 0%,
        rgba(127, 29, 29, 0.65) 100%);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: rgba(252, 165, 165, 0.95);
}

.refill-status.info {
    background: linear-gradient(135deg,
        rgba(30, 58, 138, 0.35) 0%,
        rgba(29, 78, 216, 0.55) 100%);
    border: 1px solid rgba(147, 197, 253, 0.4);
    color: rgba(191, 219, 254, 0.95);
}
