/* styles/components/modals.css */

/* Report Viewer Modal */
.report-viewer-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--theme-background);
    z-index: 2000;
    overflow: hidden;
    display: none;
}

.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-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);
}

.report-content-area {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 80px 40px 40px 40px;
    box-sizing: border-box;
    background-color: var(--theme-background);
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent) rgba(0,0,0,0.1);
}

.report-content-area::-webkit-scrollbar { 
    width: 8px; 
}

.report-content-area::-webkit-scrollbar-track { 
    background: rgba(0,0,0,0.1); 
    border-radius: 4px;
}

.report-content-area::-webkit-scrollbar-thumb { 
    background-color: var(--theme-accent); 
    border-radius: 4px; 
}

.report-content-area::-webkit-scrollbar-thumb:hover {
    background-color: #3a80d2;
}

/* LLM Modals */
.llm-modal-overlay {
    display: none;
    position: fixed;
    z-index: 2001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.llm-modal-overlay.visible {
    display: flex;
}

.llm-modal-content {
    background-color: var(--theme-background);
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.llm-modal-content.llm-credit-modal {
    max-width: 500px;
}

.llm-modal-content.llm-cost-estimate-modal {
    max-width: 600px;
}

.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);
}

.llm-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: var(--theme-section-bg);
}

/* Wallet Panels & Overlay */
.slide-up-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100vh;
    width: 100%;
    height: auto;
    max-height: 85vh;
    background: linear-gradient(135deg, var(--theme-section-bg) 0%, rgba(37, 42, 61, 0.95) 100%);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(74, 144, 226, 0.1);
    border-bottom: none;
}

.slide-up-panel.visible {
    bottom: 0;
}

.panel-content {
    padding: 32px 28px;
    padding-top: 56px;
    text-align: center;
    position: relative;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* QR Scanner Modal */
.qr-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-scanner-modal.visible {
    opacity: 1;
    visibility: visible;
}

.qr-scanner-content {
    background: linear-gradient(135deg, var(--theme-section-bg) 0%, rgba(37, 42, 61, 0.95) 100%);
    padding: 24px;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    position: relative;
    text-align: center;
    border: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-scanner-modal.visible .qr-scanner-content {
    transform: translateY(0);
}

/* Market Pulse Modal */
.mp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2001;
}

.mp-modal-overlay.visible {
    display: flex;
}

.mp-modal-content {
    background-color: var(--theme-background);
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.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);
}

.mp-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: var(--theme-section-bg);
}