/* ── Staking Tabs ──────────────────────────────────────────────── */

.staking-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.staking-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.25s ease;
    font-weight: 500;
    position: relative;
    bottom: -1px;
}

.staking-tab:hover {
    color: var(--text-primary);
}

.staking-tab.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

/* ── Staking Plans Grid ───────────────────────────────────────── */

.staking-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.staking-plan-card {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.staking-plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.staking-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.staking-plan-card:hover::before {
    opacity: 1;
}

/* ── Plan Header ──────────────────────────────────────────────── */

.staking-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staking-currency {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.staking-currency img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.staking-plan-card:hover .staking-currency img {
    border-color: rgba(59, 130, 246, 0.5);
}

.staking-apy {
    color: #10b981;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ── Plan Details ─────────────────────────────────────────────── */

.staking-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.staking-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staking-detail-row strong {
    color: var(--text-primary);
}

/* ── Stake Input ──────────────────────────────────────────────── */

.stake-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.stake-input-group input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md, 8px);
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.stake-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.stake-input-group input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.btn-stake {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-stake:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Staking Positions ────────────────────────────────────────── */

.staking-positions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.staking-position-item {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.staking-position-item:hover {
    border-color: rgba(59, 130, 246, 0.25);
    background: var(--surface-hover, var(--surface-2));
}

.pos-info {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.pos-currency {
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.pos-details {
    font-size: 0.82rem;
    color: var(--gray);
    line-height: 1.5;
}

.pos-status {
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
}

.pos-status.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.pos-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.pos-status.unstaked {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.15);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 640px) {
    .staking-plans-grid {
        grid-template-columns: 1fr;
    }
    .staking-position-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .pos-status {
        align-self: flex-end;
    }
}
