/* ===== TOOL PAGE STYLESHEET ===== */
/* Shared by all 30 healthcare tool pages */

/* Tool container */
.icd-tool {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* HERO */
.icd-hero {
    text-align: center;
    padding: 40px 20px 36px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    margin-bottom: 32px;
    border: 1px solid #bae6fd;
}

.icd-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0b2f4a;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.icd-hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 14px;
}

.icd-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icd-hero-sub {
    font-size: 17px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.icd-trust-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.icd-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.badge-icon {
    font-size: 16px;
}

/* TOOL CONTAINER */
.icd-tool-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
}

/* OPTIONS BAR */
.icd-options-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #475569;
}

.icd-options-bar label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

.icd-options-bar input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

/* TEXTAREAS GRID */
.icd-textareas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.icd-textarea-wrap {
    display: flex;
    flex-direction: column;
}

.icd-textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.icd-textarea-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 16px;
}

.icd-textarea-actions {
    display: flex;
    gap: 6px;
}

.icd-small-btn {
    padding: 5px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.icd-small-btn:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.icd-textarea-stats {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    margin-bottom: 6px;
    min-height: 18px;
    display: block;
}

.icd-textarea {
    width: 100%;
    height: 260px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
    resize: vertical;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.2s, background 0.2s;
}

.icd-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.icd-output-textarea {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

/* RESULT STATS BAR */
.icd-result-stats {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #14532d;
    flex-wrap: wrap;
}

.icd-result-stats.visible {
    display: flex;
}

.icd-stat-item {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stat-icon {
    font-size: 18px;
}

.icd-stat-divider {
    width: 1px;
    height: 20px;
    background: #86efac;
}

/* BUTTONS ROW */
.icd-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.icd-btn {
    padding: 12px 22px;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.icd-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.icd-btn-primary {
    background: #0ea5e9;
    color: white;
}

.icd-btn-primary:hover {
    background: #0284c7;
}

.icd-btn-success {
    background: #22c55e;
    color: white;
}

.icd-btn-success:hover {
    background: #16a34a;
}

.icd-btn-warning {
    background: #f59e0b;
    color: white;
}

.icd-btn-warning:hover {
    background: #d97706;
}

.icd-btn-outline {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.icd-btn-outline:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    transform: none;
    box-shadow: none;
}

/* PRIVACY BAR */
.icd-privacy-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.icd-privacy-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* CONTENT SECTIONS */
.icd-content-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 28px;
}

.icd-content-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
}

.icd-content-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 10px;
}

.icd-content-section p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.75;
    margin-bottom: 12px;
}

.icd-content-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.icd-content-section ul li {
    padding: 7px 0 7px 26px;
    position: relative;
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

.icd-content-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 800;
}

/* OTHER TOOLS */
.icd-other-tools {
    margin-bottom: 28px;
}

.icd-other-tools h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.icd-other-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.icd-other-tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s;
    justify-content: space-between;
}

.icd-other-tool-link:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: #f0f9ff;
    text-decoration: none;
    transform: translateX(4px);
}

.otl-icon {
    font-size: 18px;
}

.otl-arrow {
    margin-left: auto;
    color: #94a3b8;
}

/* HIPAA SECTION */
.icd-hipaa-section {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: 16px;
    padding: 36px;
    color: white;
    margin-bottom: 28px;
}

.icd-hipaa-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 14px;
}

.icd-hipaa-section p {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.75;
    margin-bottom: 12px;
}

.icd-hipaa-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.icd-hipaa-point {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.hp-icon {
    font-size: 18px;
}

/* DARK MODE */
body.dark-mode .icd-hero {
    background: linear-gradient(135deg, #0f1b2d 0%, #162a42 100%);
    border-color: #1e3a56;
}

body.dark-mode .icd-hero h1 {
    color: #e0f2fe;
}

body.dark-mode .icd-hero-sub {
    color: #8faabe;
}

body.dark-mode .icd-trust-badge {
    background: #12253a;
    border-color: #1e3a56;
    color: #94a3b8;
}

body.dark-mode .icd-tool-container {
    background: #12253a;
    border-color: #1e3a56;
}

body.dark-mode .icd-options-bar {
    background: #0b1929;
    border-color: #1e3a56;
    color: #8faabe;
}

body.dark-mode .icd-textarea {
    background: #0b1929;
    border-color: #1e3a56;
    color: #d0e2ee;
}

body.dark-mode .icd-textarea:focus {
    background: #0f1b2d;
    border-color: #4da8da;
}

body.dark-mode .icd-output-textarea {
    background: #0b2a1d;
    border-color: #22543d;
    color: #86efac;
}

body.dark-mode .icd-small-btn {
    background: #162a42;
    border-color: #1e3a56;
    color: #7a9bb5;
}

body.dark-mode .icd-small-btn:hover {
    background: #0ea5e9;
    color: white;
}

body.dark-mode .icd-privacy-bar {
    background: #0b1929;
}

body.dark-mode .icd-content-section {
    background: #12253a;
    border-color: #1e3a56;
}

body.dark-mode .icd-content-section h2,
body.dark-mode .icd-content-section h3 {
    color: #e0f2fe;
}

body.dark-mode .icd-content-section p,
body.dark-mode .icd-content-section li {
    color: #7a9bb5;
}

body.dark-mode .icd-other-tools h2 {
    color: #e0f2fe;
}

body.dark-mode .icd-other-tool-link {
    background: #12253a;
    border-color: #1e3a56;
    color: #8faabe;
}

body.dark-mode .icd-other-tool-link:hover {
    background: #0f1b2d;
    color: #4da8da;
    border-color: #4da8da;
}

body.dark-mode .icd-btn-outline {
    background: #12253a;
    color: #7a9bb5;
    border-color: #1e3a56;
}

body.dark-mode .icd-result-stats {
    background: #0b2a1d;
    border-color: #22543d;
    color: #86efac;
}

body.dark-mode .icd-textarea-label {
    color: #8faabe;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .icd-textareas {
        grid-template-columns: 1fr;
    }

    .icd-hero h1 {
        font-size: 26px;
    }

    .icd-hero-sub {
        font-size: 15px;
    }

    .icd-tool-container {
        padding: 18px;
    }

    .icd-content-section {
        padding: 24px;
    }

    .icd-hipaa-section {
        padding: 24px;
    }

    .icd-buttons-row {
        flex-direction: column;
    }

    .icd-btn {
        justify-content: center;
    }

    .icd-other-tools-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .icd-other-tools-grid {
        grid-template-columns: 1fr;
    }

    .icd-hipaa-points {
        grid-template-columns: 1fr 1fr;
    }
}