﻿
/* ========================================
   CRITICAL OVERLAP FIX
   ======================================== */

/* Force details-grid to be outside grid flow */
.details-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin-top: 4rem !important;
    padding-top: 3rem !important;
    border-top: 2px solid var(--border-subtle) !important;
    width: 100% !important;
    position: relative !important;
    clear: both !important;
    grid-column: 1 / -1 !important;
}

/* Ensure content-grid-row contains its children properly */
.content-grid-row {
    display: grid !important;
    grid-template-columns: 0.9fr 1.1fr !important;
    gap: 2.5rem !important;
    margin-bottom: 5rem !important;
    align-items: start !important;
}

/* Ensure sections have proper height */
.vault-id-section {
    height: auto !important;
    min-height: 280px !important;
}

.keys-section {
    height: auto !important;
}

/* ========================================
   HEADER CONTROLS FIX - TOP RIGHT
   ======================================== */
.vault-header-controls {
    position: fixed !important; /* Changed from absolute to fixed */
    top: 1.5rem !important;
    right: 2rem !important;
    z-index: 1000 !important; /* Ensure it's above everything */
    display: flex !important;
    gap: 1rem !important;
}

/* ========================================
   PROOF OF EXISTENCE TEXT OVERFLOW FIX
   ======================================== */
.tx-hash {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tx-link {
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.detail-item {
    min-width: 0 !important; /* Critical for text overflow to work in grid */
    overflow: hidden !important;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
    .content-grid-row {
        grid-template-columns: 1fr !important;
        margin-bottom: 3rem !important;
    }
    
    .details-grid {
        margin-top: 3rem !important;
    }
    
    .vault-header-controls {
        top: 1rem !important;
        right: 1rem !important;
    }
}

@media (max-width: 600px) {
    .details-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }
    
    .vault-header-controls {
        top: 0.75rem !important;
        right: 1rem !important;
    }
}


/* Backup disclosure styling */
.backup-disclosure {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.backup-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: inline-block;
}

.backup-link:hover {
    color: var(--gold-primary);
}

.not-recommended {
    color: #ef4444;
    font-style: italic;
    font-size: 0.85rem;
}

/* Light mode */
[data-theme='light'] .backup-link {
    color: #64748B;
}

[data-theme='light'] .backup-link:hover {
    color: var(--gold-primary);
}


/* Backup status animation */
.backup-status {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.status-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(187, 153, 84, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.status-text {
    color: var(--gold-primary);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.status-text.ready {
    color: #4ade80;
    font-size: 1rem;
    font-weight: 600;
}

/* Hide spinner when ready */
.backup-status.ready .status-spinner {
    display: none;
}

/* Download button animation in status */
.backup-status .btn-download-all {
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Light mode */
[data-theme='light'] .status-spinner {
    border-color: rgba(187, 153, 84, 0.3);
    border-top-color: var(--gold-primary);
}

[data-theme='light'] .status-text {
    color: #947225;
}

[data-theme='light'] .status-text.ready {
    color: #16a34a;
}

