/* CCOS Tools - LP Revenue Comparison Tool */

/* ===============================
   General Settings
   =============================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Nunito", sans-serif;
}

/* ===============================
   Main Page
   =============================== */

body {
    background: #0f172a;
    color: #e5e7eb;
    min-height: 100vh;
    padding: 30px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===============================
   Headings
   =============================== */

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

h2 {
    text-align: center;
    margin-bottom: 25px;
}

/* ===============================
   Pool Set Bar
   =============================== */

.scenario-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* ===============================
   Dropdown Lists
   =============================== */

select {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 40px 12px 14px;
    font-size: 15px;
    cursor: pointer;
    min-height: 44px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 18px,
        calc(100% - 12px) 18px;
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

select:hover {
    border-color: #38bdf8;
}

select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

/* Scenario Selector */

.scenario-bar select {
    flex: 1;
    min-width: 220px;
    padding: 12px;
}

.scenario-bar button {
    width: auto;
    margin-top: 0;
}

/* ===============================
   General Cards
   =============================== */

.card {
    background: #1e293b;
    border-radius: 16px;
    padding: 8px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ===============================
   Liquidity Position
   =============================== */

.input-group {
    padding: 10px 0;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group span {
    white-space: nowrap;
    color: #cbd5e1;
}

/* ===============================
   Input Fields
   =============================== */

input {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    width: 160px;
}

input:focus {
    outline: none;
    border-color: #38bdf8;
}

/* ===============================
   Pool Card
   =============================== */

.pool {
    border: 1px solid #475569;
    border-radius: 12px;
    padding: 25px;
}

.pool-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* Pool Header */

.pool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pool-header h3 {
    margin: 0;
}

/* ===============================
   Pool Parameters
   =============================== */

.pool-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 15px;
}

.pool-meta label {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===============================
   Pool Calculation Inputs
   =============================== */

.pool-inputs {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
    margin-top: 15px;
}

.pool-inputs label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pool-inputs .input-group {
    padding: 0;
}

.pool-inputs .input-group span {
    display: inline-block;
    white-space: nowrap;
}

.pool-inputs input {
    width: 120px;
}

/* ===============================
   Pool Calculation Results
   =============================== */

.pool-results {
    margin-top: 15px;
    padding: 15px 20px;
    background: #334155;
    border-radius: 10px;
    border: 1px solid #475569;
}

.pool-results p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    color: #cbd5e1;
}

.pool-results span {
    color: #f1f5f9;
    font-weight: 600;
}

/* ===============================
   Buttons
   =============================== */

button {
    width: auto;
    padding: 12px 20px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #0369a1;
}

#addPool {
    margin-top: 20px;
}

.delete-pool {
    background: #dc2626;
    padding: 8px 15px;
    font-size: 14px;
}

.delete-pool:hover {
    background: #b91c1c;
}

/* ===============================
   Income Chart
   =============================== */

.chart-container {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.chart-container canvas {
    max-height: 350px;
}

/* ===============================
   Responsive Layout
   =============================== */

@media (max-width: 700px) {
    body {
        padding: 15px;
    }

    .pool-inputs {
        flex-wrap: wrap;
    }

    .scenario-bar {
        flex-wrap: wrap;
    }
}

/* ===============================
   Save Message
   =============================== */

#saveMessage {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 10px 18px;
    background: #036f09;
    color: #ffffff;
    border: 1px solid #06570a;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}

/* ===============================
   Merge Pool Sets Window
   =============================== */

.merge-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.merge-window {
    background: #ffffff;
    width: 450px;
    max-width: 90%;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.merge-window h3 {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: center;
    color: black;
}

.merge-list {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #334155;
}

.merge-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.merge-list label:last-child {
    border-bottom: none;
}

.merge-list label:hover {
    background: #0f172a;
}

.merge-list input {
    width: 16px;
    height: 16px;
}

.merge-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.merge-buttons button {
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
}

/* Temporary data tools */

.data-tools {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}