/* Nail-biters Analysis Specific Styles */

/* Nail-biters Analysis Specific Styles */


/* Page Title and Controls Styling */
.section-title {
    margin-bottom: 40px;
    font-size: 2rem;
    line-height: 1.3;
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 20px;
}

/* Toggle Container */
.toggle-container {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-standard);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.toggle-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.toggle-btn:hover {
    background-color: rgba(30, 86, 49, 0.1);
}

/* Methodology button styling */
.methodology-btn {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--text-dark);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-standard);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.methodology-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Chart Container */
.chart-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

/* Download section inside chart container */
.download-section {
    text-align: right;
    padding: 20px 0 0;
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.download-section .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    min-width: 150px;
}

/* DataTables customization */
.dataTables_wrapper {
    margin-top: 20px;
    font-family: 'Montserrat', sans-serif;
}

table.dataTable {
    border-collapse: collapse !important;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

table.dataTable thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    border: none;
    padding: 12px 15px;
}

table.dataTable tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

table.dataTable tbody tr:hover {
    background-color: rgba(30, 86, 49, 0.05);
}

/* NBI Components Grid */
.nbi-components-grid {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow-soft);
}

.nbi-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nbi-component {
    background: white;
    padding: 20px 25px;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.nbi-component:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.nbi-component h4 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
}

.nbi-component p {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.weight {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(30, 86, 49, 0.1);
    display: inline-block;
}

/* Detailed explanation */
.nbi-detailed-explanation {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

.nbi-detailed-explanation h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.nbi-detailed-explanation p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* NBI Formula and Components */
.nbi-breakdown {
    margin-top: 40px;
}

.nbi-formula {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nbi-formula h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.formula-text {
    font-family: 'Montserrat', monospace;
    line-height: 1.6;
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(30, 86, 49, 0.05);
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Add smooth scrolling to body */
html {
    scroll-behavior: smooth;
}

/* Tooltip and Modal Styles */
.tooltip-content {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* Enhanced Tooltip Styles */
.tooltip {
    position: absolute;
    z-index: 1070;
    font-size: 0.85rem;
}

.tooltip-inner {
    max-width: 300px;
    padding: 12px;
    background-color: #fff;
    color: #333;
    text-align: left;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    line-height: 1.4;
}

.tooltip-inner strong {
    color: #1e5631;
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tooltip-inner em {
    color: #666;
    font-style: italic;
    display: block;
    margin-top: 6px;
}

.tooltip-inner br {
    margin-bottom: 6px;
}

.iconic-star {
    margin-left: 8px;
    cursor: pointer;
}

.iconic-star .fa-star {
    color: #ffd700;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }

    .toggle-container {
        flex-wrap: wrap;
    }

    .toggle-btn {
        width: 100%;
        max-width: 200px;
    }

    .nbi-components {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .formula-text {
        font-size: 0.95rem;
        padding: 12px;
    }
}

@media (max-width: 768px) {

    .nbi-quick-explanation,
    .nbi-detailed-explanation {
        padding: 20px;
    }

    .nbi-component {
        padding: 20px;
    }

    .nbi-formula {
        padding: 20px;
    }

    .formula-text {
        font-size: 0.9rem;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .toggle-btn {
        max-width: none;
    }

    table.dataTable {
        font-size: 0.85rem;
    }

    .nbi-components {
        grid-template-columns: 1fr;
    }

    .formula-text {
        font-size: 0.85rem;
    }
}

/* NBI score styling */
.nbi-100 {
    color: #666;
    font-size: 0.9em;
}

/* Component details styling */
.details-container {
    padding: 20px;
    background: rgba(30, 86, 49, 0.02);
    border-radius: 4px;
    margin: 10px 0;
}

.components-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.component-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 15px;
}

.component-name {
    font-weight: 500;
    color: var(--text-dark);
}

.component-bar-container {
    height: 8px;
    background: rgba(30, 86, 49, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.component-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    max-width: 100%;
}

.component-value {
    font-size: 0.9em;
    color: var(--primary-color);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

/* Nail-Biters Index (NBI) Specific Styles */

/* Article header and intro styles consistent with other pages */
.article-header {
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.intro-text {
    max-width: 800px;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #333;
}

.intro-text p:first-child {
    margin-bottom: 0.8rem;
}

.intro-text p:last-child {
    margin-bottom: 0;
}