/* Tools Page Styles */

/* Tab Navigation */
#toolsTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
}

#toolsTabs .nav-link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#toolsTabs .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

#toolsTabs .nav-link.active {
    background: #fff;
    color: #0D2237;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Tool Cards */
.tool-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tool-card h3 {
    color: #0D2237;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Dosage Calculator */
.calculator-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.dose-result {
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1rem;
}

.dose-result h4 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dose-result p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Anatomy Explorer */
.anatomy-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.anatomy-svg-container {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.anatomy-svg-container svg {
    width: 100%;
    height: auto;
}

.anatomy-info-panel {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.anatomy-region {
    cursor: pointer;
    transition: all 0.3s ease;
    fill: rgba(13, 34, 55, 0.1);
    stroke: #0D2237;
    stroke-width: 1;
}

.anatomy-region:hover {
    fill: rgba(13, 34, 55, 0.3);
}

.anatomy-region.active {
    fill: rgba(13, 34, 55, 0.4);
    stroke-width: 2;
}

.region-title {
    color: #0D2237;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0D2237;
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section h5 {
    color: #1a3a5c;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-section p, .info-section ul {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-section ul {
    padding-left: 1.2rem;
}

/* Quiz System */
.quiz-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-category-card {
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
}

.quiz-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 34, 55, 0.3);
}

.quiz-category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.quiz-category-card h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.quiz-category-card p {
    opacity: 0.8;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.quiz-container {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.quiz-progress {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.quiz-progress-bar {
    background: linear-gradient(90deg, #0D2237, #1a3a5c);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 1.25rem;
    color: #0D2237;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
}

.quiz-option:hover {
    border-color: #0D2237;
    background: #fff;
}

.quiz-option.selected {
    border-color: #0D2237;
    background: rgba(13, 34, 55, 0.05);
}

.quiz-option.correct {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.quiz-option.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.quiz-feedback {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: none;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #155724;
}

.quiz-feedback.incorrect {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #721c24;
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-score {
    font-size: 4rem;
    font-weight: 700;
    color: #0D2237;
    margin-bottom: 1rem;
}

.quiz-score-text {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Treatment Planner */
.planner-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.planner-canvas {
    flex: 1;
    min-width: 350px;
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
}

.planner-canvas svg {
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.planner-controls {
    flex: 0 0 280px;
}

.product-selector {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.product-selector h5 {
    color: #0D2237;
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 0.5rem;
}

.product-option:hover {
    background: #f8f9fa;
}

.product-option input[type="radio"] {
    margin-right: 0.75rem;
}

.product-option .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.injection-marker {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.injection-marker:hover {
    transform: scale(1.2);
}

.planner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.planner-actions button {
    flex: 1;
    min-width: 80px;
}

.treatment-summary {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.treatment-summary h5 {
    color: #0D2237;
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

/* Dr. MTAI Helper Boxes */
.dr-mtai-quote, .dr-mtai-tip, .dr-mtai-warning, .dr-mtai-intro {
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dr-mtai-quote {
    background: linear-gradient(135deg, rgba(13, 34, 55, 0.05) 0%, rgba(26, 58, 92, 0.1) 100%);
    border-left: 4px solid #0D2237;
}

.dr-mtai-tip {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}

.dr-mtai-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
}

.dr-mtai-intro {
    background: linear-gradient(135deg, #0D2237 0%, #1a3a5c 100%);
    color: #fff;
}

.dr-mtai-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dr-mtai-content {
    flex: 1;
}

.dr-mtai-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #toolsTabs {
        justify-content: center;
    }

    #toolsTabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .anatomy-container,
    .planner-container {
        flex-direction: column;
    }

    .anatomy-svg-container,
    .planner-canvas {
        max-width: 100%;
    }

    .planner-controls {
        flex: 1 1 100%;
    }

    .quiz-score {
        font-size: 3rem;
    }
}

/* Print Styles for Treatment Planner */
@media print {
    .planner-controls,
    .planner-actions,
    #toolsTabs,
    .navbar,
    .chatbot-container,
    footer {
        display: none !important;
    }

    .planner-canvas {
        width: 100%;
        max-width: none;
    }
}
