/* styles/layout/header.css */

/* Content header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--theme-border);
    background-color: var(--theme-background);
    height: var(--header-height, 60px);
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--theme-text);
}

.status-bar {
    padding: 0;
    background-color: transparent;
    font-size: 0.8rem;
    color: var(--theme-text-secondary);
    border: none;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.status-item {
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.status-item code {
    font-size: 1em;
    color: var(--theme-text);
    background-color: transparent;
    padding: 0;
    word-break: break-all;
}

/* Sidebar toggle button */
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--theme-text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.sidebar-toggle:hover {
    color: var(--theme-text);
}

/* Mobile specific header adjustments */
@media (max-width: 768px) {
    .content-header {
        padding-left: 4.5rem;
        position: relative;
    }

    #sidebar-toggle-btn {
        display: block !important;
        position: absolute;
        left: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        font-size: 1.5rem;
        color: var(--theme-text);
        padding: 0.5rem;
    }

    .content-header h1 {
        font-size: 1.3rem;
    }

    .status-bar {
        display: none;
    }
}

/* Section header bar (for My Reports, etc.) */
.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--theme-border);
}

.section-header-bar h2 {
    margin: 0;
    color: var(--theme-accent);
    font-size: 1.4rem;
}

.section-header-bar .report-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.section-header-bar .section-actions {
    display: flex;
    gap: 1rem;
}

.section-header-bar .section-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.section-header-bar .section-actions button i.fa-spin {
    animation: fa-spin 1s linear infinite;
}

.content-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--theme-text);
    text-align: center; /* This was missing */
    flex-grow: 1; /* Takes available space */
}
/* Mobile responsive for section header */
@media (max-width: 768px) {
    .section-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .section-header-bar h2 {
        font-size: 1.3rem;
    }

    .content-header h1 {
        font-size: 1.3rem;
        text-align: center;
    }
}

/* Form actions section */
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#pair-settings-save-status {
    margin-left: 1rem;
    font-size: 0.9rem;
}

/* Form subsection header */
.form-subsection h3 {
    font-size: 1.1rem;
    color: var(--theme-accent);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Report header */
.report-viewer-container h3 {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    font-size: 1.4rem;
    color: var(--theme-text);
    z-index: 2001;
}

/* Close report button */
.close-report-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--theme-text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 12px;
    line-height: 1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    backdrop-filter: blur(10px);
}

.close-report-btn:hover {
    background: rgba(255, 61, 113, 0.2);
    border-color: rgba(255, 61, 113, 0.4);
    color: var(--theme-bearish);
    transform: scale(1.05);
}

/* LLM header */
.llm-credit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
    background: var(--theme-section-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--theme-border);
}

/* Market Pulse header */
.mp-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--theme-section-bg);
}

.mp-modal-header h3 {
    margin: 0;
    color: var(--theme-accent);
    font-size: 1.3rem;
}

.mp-close-modal {
    background: none;
    border: none;
    color: var(--theme-text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.mp-close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-text);
}

/* Modal headers */
.llm-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--theme-section-bg);
}

.llm-modal-header h3 {
    margin: 0;
    color: var(--theme-accent);
    font-size: 1.3rem;
}

.llm-close-modal {
    background: none;
    border: none;
    color: var(--theme-text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.llm-close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-text);
}

/* Wallet header elements */
.wallet-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.wallet-button:hover i {
    transform: scale(1.1);
}

.wallet-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.wallet-button.secondary-btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.wallet-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--theme-text-secondary) !important;
}

.wallet-button:disabled::before {
    display: none;
}

/* Animation for fa-spin (ensure it exists) */
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}