/* type: uploaded file
fileName: paulownia-calc 11/assets/style.css
*/
/* ISOLATION & RESET */
#pic-app {
    width: 100%; max-width: 1000px; margin: 20px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #212529; box-sizing: border-box;
    --pic-radius: 10px;
}
#pic-app * { box-sizing: border-box; }
#pic-app .hidden { display: none !important; }

/* SECTIONS WRAPPER */
.pic-settings-wrapper, .pic-results-wrapper {
    background-color: #f8f9fa; border-radius: 12px; padding: 20px;
    margin-bottom: 25px; border: 1px solid #e9ecef;
    position: relative;
}
.pic-section-label {
    position: absolute; top: -12px; left: 20px;
    background: #6c757d; color: #fff; padding: 2px 10px;
    font-size: 0.75rem; border-radius: 4px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* HEADINGS */
#pic-app h1 { text-align: center; font-size: 1.8rem; margin-bottom: 5px; line-height: 1.2; font-weight: 800; }
#pic-app h3 { font-size: 1.2rem; margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; }
#pic-app h4 { margin: 0 0 10px 0; font-size: 1rem; font-weight: 700; }
#pic-app p { text-align: center; color: #6c757d; margin-bottom: 15px; font-size: 0.95rem; }

/* THEMES */
#pic-app[data-theme="industrial"] { --pic-primary: #198754; }
#pic-app[data-theme="industrial"] .pic-main-card { background-color: #f4fbf6; border: 1px solid #198754; }

#pic-app[data-theme="buyback"] { --pic-primary: #0d6efd; }
#pic-app[data-theme="buyback"] .pic-main-card { background-color: #f0f7ff; border: 1px solid #0d6efd; }

#pic-app[data-theme="custom"] { --pic-primary: #fd7e14; }
#pic-app[data-theme="custom"] .pic-main-card { background-color: #fff9f2; border: 1px solid #fd7e14; }

/* UTILS */
#pic-app .text-primary { color: var(--pic-primary) !important; }
#pic-app .text-accent { color: #dc3545 !important; }

/* INFO GRID */
#pic-app .pic-info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;
}
#pic-app .pic-info-box {
    background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px; padding: 10px; text-align: center;
}
#pic-app .pic-info-title { font-size: 0.8rem; color: #666; margin-bottom: 4px; }
#pic-app .pic-info-val { font-size: 1.1rem; font-weight: 800; color: var(--pic-primary); }

#pic-app .pic-custom-area-row,
#pic-app .pic-info-area-row {
    text-align: center; margin-bottom: 15px; font-size: 0.95rem; color: #444;
}
#pic-app .pic-info-area-row strong { font-size: 1.1rem; color: #000; }

/* MAIN CARD */
#pic-app .pic-main-card {
    background: #fff; border-radius: var(--pic-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 20px; overflow: hidden;
    transition: background-color 0.3s, border-color 0.3s;
}
#pic-app .pic-card-title-wrap { padding: 15px 25px; border-bottom: 1px solid rgba(0,0,0,0.05); background: rgba(255,255,255,0.6); }
#pic-app .pic-controls-body { padding: 20px 10px; }

/* BUTTONS */
#pic-app .pic-mode-switcher { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 10px; padding: 20px 0;
}
#pic-app .pic-mode-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; background: #fff; border: 1px solid #ddd; border-radius: 10px;
    cursor: pointer; transition: all 0.2s ease; text-align: left; appearance: none;
    width: 100%; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
#pic-app .pic-mode-btn:hover { border-color: #aaa; transform: translateY(-2px); }
#pic-app .pic-mode-btn.active {
    border-color: var(--pic-primary); box-shadow: 0 0 0 2px var(--pic-primary); background: #fff; z-index: 2;
}
#pic-app .btn-icon-wrap { width: 32px; height: 32px; color: #adb5bd; flex-shrink: 0; }
#pic-app .pic-mode-btn.active .btn-icon-wrap { color: var(--pic-primary); }
#pic-app .pic-mode-btn strong { display: block; font-size: 0.95rem; color: #000; margin-bottom: 2px; line-height: 1.2; }
#pic-app .pic-mode-btn span { font-size: 0.75rem; color: #6c757d; line-height: 1.1; }

/* INPUTS & SLIDER */
#pic-app .pic-control-group { margin-bottom: 5px; }
#pic-app .pic-slider-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; }
#pic-app .pic-area-value { font-size: 1.3rem; color: var(--pic-primary); font-weight: 800; }

/* SLIDER WRAPPER & TOOLTIP */
#pic-app .pic-slider-container {
    position: relative;
    padding: 15px 0 5px 0; /* space for tooltip */
    z-index: 5;
}
#pic-app input[type="range"] {
    width: 100%; height: 8px; border-radius: 5px; background: #e9ecef; outline: none; -webkit-appearance: none; margin: 0; display: block;
}
#pic-app input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; border: 5px solid var(--pic-primary); cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); position: relative; z-index: 2;
}

/* Tooltip Styles UPDATED */
#pic-app .pic-slider-tooltip {
    position: absolute;
    bottom: 35px; /* выше ползунка */
    transform: translateX(-50%);
    background: #fff; color: #333;
    padding: 15px; border-radius: 8px;
    font-size: 0.85rem; line-height: 1.4;
    text-align: left; /* Текст слева */
    width: 340px; /* Фиксированная ширина для контента */
    pointer-events: none;
    opacity: 0; transition: opacity 0.2s, left 0.1s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.1);
    z-index: 100;
}
#pic-app .pic-slider-tooltip.visible { opacity: 1; }

/* Внутренние элементы тултипа */
#pic-app .pic-tt-row { margin-bottom: 4px; display: flex; justify-content: space-between; }
#pic-app .pic-tt-row strong { color: #000; }
#pic-app .pic-tt-title { font-weight: 800; margin-bottom: 8px; color: var(--pic-primary); font-size: 0.95rem; border-bottom: 1px solid #eee; padding-bottom: 5px; }
#pic-app .pic-tt-list { margin: 8px 0; padding-left: 0; list-style: none; font-size: 0.8rem; color: #555; }
#pic-app .pic-tt-list li { margin-bottom: 3px; padding-left: 10px; position: relative; }
#pic-app .pic-tt-list li::before { content: "•"; position: absolute; left: 0; color: var(--pic-primary); }
#pic-app .pic-tt-total { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee; font-weight: 700; color: #000; font-size: 0.9rem; }
#pic-app .pic-tt-accent { color: #dc3545; font-weight: 800; display: block; margin-top: 5px; font-size: 1rem; }

#pic-app .pic-slider-tooltip .tooltip-arrow {
    position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
    filter: drop-shadow(0 2px 1px rgba(0,0,0,0.05));
}


#pic-app .pic-input-currency { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: #999; pointer-events: none; }
#pic-app .pic-custom-header { text-align: center; margin-bottom: 5px; font-weight: 600; font-size: 0.95rem; }
#pic-app .pic-slider-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 0.8rem; color: #888; }

/* COST STRUCTURE */
#pic-app .pic-divider { border: 0; border-top: 1px solid rgba(0,0,0,0.08); margin: 20px 0; }
#pic-app .pic-cost-structure { background: rgba(255,255,255,0.7); padding: 15px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.05); font-size: 0.9rem; }
#pic-app .pic-cost-row { display: flex; justify-content: space-between; margin-bottom: 6px; border-bottom: 1px dashed rgba(0,0,0,0.1); padding-bottom: 4px; }
#pic-app .pic-cost-row.total { border-top: 1px solid rgba(0,0,0,0.2); padding-top: 10px; border-bottom: none; margin-top: 10px; font-size: 1.05rem; font-weight: 700; }
#pic-app .col-right { text-align: right; display: flex; flex-direction: column; }
#pic-app .col-right small { font-size: 0.7rem; color: #666; }

/* NEW LIST STYLE (BULLETS) */
#pic-app .pic-cost-list {
    list-style: none; padding: 0; margin: 0;
}
#pic-app .pic-cost-list li {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 8px; font-size: 0.95rem; line-height: 1.4;
    position: relative; padding-left: 15px;
}
#pic-app .pic-cost-list li .bull {
    position: absolute; left: 0; top: 0; color: var(--pic-primary); font-weight: bold;
}
#pic-app .pic-cost-list li strong {
    white-space: nowrap; margin-left: 10px;
}

/* BUYBACK GRID */
#pic-app .pic-buyback-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 15px; }
#pic-app .pic-bb-card {
    border: 1px solid #ddd; padding: 10px 5px; text-align: center; border-radius: 8px; cursor: pointer; transition: 0.2s; background: #fff;
}
#pic-app .pic-bb-card:hover { border-color: #999; }
#pic-app .pic-bb-card.active { border-color: var(--pic-primary); background: #fff; box-shadow: 0 0 0 2px var(--pic-primary) inset; }
#pic-app .bb-year { font-weight: bold; color: #555; font-size: 0.85rem; margin-bottom: 2px; }
#pic-app .bb-label { font-size: 0.75rem; color: #999; margin-bottom: 2px; line-height: 1; }
#pic-app .bb-roi { color: var(--pic-primary); font-weight: 800; font-size: 1.1rem; }

/* DASHBOARD */
#pic-app .pic-dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
#pic-app .pic-dash-card {
    padding: 12px; border-radius: 8px; color: #fff; text-align: center; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
#pic-app .pic-dash-card.blue { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
#pic-app .pic-dash-card.green { background: linear-gradient(135deg, #198754, #146c43); }
#pic-app .pic-dash-card.purple { background: linear-gradient(135deg, #6f42c1, #59359a); }
#pic-app .pic-dash-card.orange { background: linear-gradient(135deg, #fd7e14, #d35400); }
#pic-app .dash-bg-icon { position: absolute; right: -5px; bottom: -5px; width: 40px; height: 40px; opacity: 0.15; color: #fff; pointer-events: none; }
#pic-app .dash-value { font-size: 1.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 2px; position: relative; z-index: 2; white-space: nowrap; }
#pic-app .dash-label { font-size: 0.75rem; opacity: 0.95; margin-bottom: 2px; position: relative; z-index: 2; }
#pic-app .dash-sub { font-size: 0.65rem; opacity: 0.8; position: relative; z-index: 2; }

/* COMPARISON & CHART */
#pic-app .pic-card { background: #fff; padding: 5px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
#pic-app .pic-comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: #fff3cd; padding: 12px; border-radius: 8px; text-align: center; margin-bottom: 15px; }
#pic-app .pic-comp-box span { font-size: 0.8rem; color: #555; }
#pic-app .pic-comp-box strong { font-size: 1.3rem; display: block; line-height: 1.1; margin-top: 3px; }
#pic-app .pic-comp-box.highlight { border-left: 1px dashed rgba(0,0,0,0.1); }
#pic-app .pic-chart-wrapper { position: relative; height: 300px; width: 100%; overflow: hidden; }

/* FOOTER */
#pic-app .pic-cta { background: var(--pic-primary); color: #fff; padding: 25px 20px; text-align: center; border-radius: 10px; margin-top: 20px; transition: background 0.3s; }
#pic-app .pic-cta h2 { color: #fff !important; font-size: 1.4rem; margin-bottom: 5px; }
#pic-app #cta-text { color: #fff; font-size: 1.2rem; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,0.2); margin-bottom: 15px; opacity: 1; }
#pic-app .pic-cta-buttons { display: flex; gap: 10px; justify-content: center; margin: 15px 0; }
#pic-app .pic-btn { padding: 10px 25px; border-radius: 6px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; display: inline-block; font-size: 0.95rem; }
#pic-app .pic-btn-outline { border: 2px solid #fff; color: #fff; background: transparent; }
#pic-app .pic-btn-fill { background: #fff; color: var(--pic-primary); }
#pic-app .pic-btn-fill:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(0,0,0,0.2); }

/* RESPONSIVE (MOBILE) IMPROVEMENTS */
@media (max-width: 768px) {
    #pic-app { 
        padding: 0px; 
        margin: 5px auto; 
        width: 100%; 
    }
    
    #pic-app .pic-slider-tooltip {
        width: 260px; /* Чуть уже на мобилках */
        padding: 10px;
    }

    .pic-settings-wrapper, .pic-results-wrapper {
        padding: 20px 15px; 
    }

    /* Stack Mode Switcher & Make buttons bigger */
    #pic-app .pic-mode-switcher { grid-template-columns: 1fr; gap: 12px; }
    #pic-app .pic-mode-btn { padding: 15px; } 

    /* Info Grid Stack */
    #pic-app .pic-info-grid { grid-template-columns: 1fr; gap: 12px; }
    #pic-app .pic-info-val { font-size: 1.3rem; }

    /* Dashboard: Keep 2 cols but larger text */
    #pic-app .pic-dashboard-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 12px; 
    }
    #pic-app .pic-dash-card { padding: 15px 5px; }
    #pic-app .dash-value { font-size: 1.25rem; }
    #pic-app .dash-label { font-size: 0.8rem; }

    /* Buyback Grid */
    #pic-app .pic-buyback-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    #pic-app .pic-bb-card { padding: 15px 5px; }

    /* Comparison Stack */
    #pic-app .pic-comp-grid { grid-template-columns: 1fr; gap: 15px; }
    #pic-app .pic-comp-box.highlight { border-left: none; border-top: 1px dashed rgba(0,0,0,0.1); padding-top: 15px; }
    
    /* Buttons Stack */
    #pic-app .pic-cta-buttons { flex-direction: column; gap: 15px; }
    #pic-app .pic-btn { width: 100%; padding: 15px; font-size: 1.1rem; }

    /* Slider Touch Target */
    #pic-app input[type="range"]::-webkit-slider-thumb {
        width: 28px; height: 28px;
    }
}

/* MODAL */
.pic-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(33, 37, 41, 0.75); backdrop-filter: blur(4px);
    z-index: 2147483647; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
.pic-modal-overlay.open { opacity: 1; visibility: visible; }

.pic-modal-container {
    background: #fff; width: 90%; max-width: 420px; padding: 35px 30px;
    border-radius: 16px; position: relative; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top: 5px solid var(--pic-primary); transform: translateY(20px); transition: transform 0.3s ease;
}
.pic-modal-overlay.open .pic-modal-container { transform: translateY(0); }

.pic-modal-close {
    position: absolute; top: 15px; right: 15px; 
    background: transparent; 
    border: none; 
    width: 32px; height: 32px; 
    padding: 0; 
    border-radius: 50%; 
    font-size: 26px; 
    line-height: 1;
    color: #495057; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.2s ease;
}
.pic-modal-close:hover { background: #e9ecef; color: #dc3545; transform: rotate(90deg); }

.pic-modal-content h3 { margin-top: 0; margin-bottom: 20px; font-size: 1.5rem; text-align: center; color: #212529; font-weight: 800; }
.pic-summary-box {
    background: #f8f9fa; border: 1px solid #e9ecef; border-left: 4px solid var(--pic-primary);
    padding: 15px; border-radius: 8px; margin-bottom: 25px; font-size: 0.95rem; color: #495057; line-height: 1.5;
}
.pic-summary-box strong { display: block; color: #212529; font-weight: 700; font-size: 1rem; margin-bottom: 5px; }

#pic-app .pic-form-group { margin-bottom: 20px; text-align: left; }
#pic-app .pic-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #343a40; font-size: 0.9rem; }
#pic-app .pic-form-group input {
    width: 100%; padding: 12px 15px; border: 2px solid #e9ecef; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; background: #fff;
}
#pic-app .pic-form-group input:focus { border-color: var(--pic-primary); outline: none; }

#pic-app .pic-btn-block {
    width: 100%; display: block; padding: 14px; font-size: 1.1rem; font-weight: 700; 
    margin-top: 15px; background: var(--pic-primary); color: #ffffff !important; 
    border: none; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); cursor: pointer; transition: all 0.2s ease;
}
#pic-app .pic-btn-block:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.25); transform: translateY(-2px); opacity: 0.95; color: #ffffff !important; }

#pic-app .pic-success-message { text-align: center; padding: 40px 0; }
#pic-app .pic-success-message h4 { font-size: 1.4rem; color: var(--pic-primary); margin-bottom: 10px; }