/*-----------------------------------------------
  SEIZURE MANAGEMENT STYLING
-----------------------------------------------*/
    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    #seizure-management .page-title {
        text-align: center;
        font-size: 2.5rem;
        font-weight: 600;
        margin: 2rem 0;
        color: var(--primary-color);
    }

    body.dark #seizure-management .page-title {
        color: var(--text-color);
    }

    #seizure-management .workflow-navigation {
        position: sticky;
        top: 64px;
        z-index: 20;
    }

    #seizure-management .workflow-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    #seizure-management .workflow-navigation .dropdown-label,
    #seizure-management .workflow-navigation .quick-links-dropdown {
        display: none;
    }

    #seizure-management .info-box {
        background: var(--info-bg);
        padding: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 1px 4px var(--shadow-color);
        margin-bottom: 1.5rem;
        transition: all 0.3s ease;
    }

    #seizure-management .section-detail {
        margin-bottom: 1.5rem;
    }

    #seizure-management .section-header {
        font-size: 1.3rem;
        font-weight: 600;
        padding: 1rem 0;
        cursor: pointer;
        color: var(--primary-color);
        transition: color 0.2s ease;
    }

    #seizure-management .section-header:hover {
        color: var(--accent-color);
    }

    #seizure-management .section-header:focus-visible {
        outline: 2px solid var(--accent-color);
        outline-offset: 4px;
    }

    body.dark #seizure-management .info-box h2,
    body.dark #seizure-management .info-box h3,
    body.dark #seizure-management .info-box h4,
    body.dark #seizure-management .section-header {
        color: var(--text-color);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* When the modal is open, prevent scrolling on the main body */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    /* Modal Styling (Keep if specific to this page or move to components/modals.css) */
    #dev-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        backdrop-filter: blur(3px);
    }

    #dev-modal .modal-content {
        background: var(--info-bg);
        padding: 2rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px var(--shadow-color);
        text-align: center;
        max-width: 400px;
        width: 90%;
    }

    #dev-modal h2 {
        margin-bottom: 1rem;
        color: var(--primary-color);
    }

    #dev-modal p {
        margin-bottom: 1.5rem;
        color: var(--text-color);
    }

    #dev-modal input[type="text"] {
        padding: 0.5rem;
        font-size: 1rem;
        width: 80%;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--info-bg);
        color: var(--text-color);
    }

    #dev-modal button {
        margin: 0 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        background: var(--accent-color);
        color: #fff;
        transition: all 0.3s ease;
    }

    #dev-modal button:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
    }

    #dev-modal .error {
        color: #ff3b30;
        margin-top: 0.5rem;
        display: none;
    }

    /* Remove bullet points for lists with class "no-bullets" (Keep if specific or move to base.css) */
    .no-bullets {
        list-style: none;
        margin: 0;
        padding-left: 0;
    }

    #status-epilepticus .status-protocol-intro {
        border: 1px solid var(--border-color);
        border-left: 4px solid var(--accent-color);
        border-radius: 8px;
        padding: 1rem;
        margin: 1.25rem 0;
        background: var(--bg-color);
    }

    #status-epilepticus .status-protocol-intro h3 {
        margin: 0 0 0.5rem;
        color: var(--primary-color);
        font-size: 1.25rem;
        font-weight: 600;
    }

    #status-epilepticus .status-protocol-intro p {
        margin: 0 0 0.75rem;
        color: var(--text-color);
    }

    #status-epilepticus .status-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .compact-action-button {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-height: 36px;
        padding: 0.45rem 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--info-bg);
        color: var(--primary-color);
        cursor: pointer;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .compact-action-button:hover,
    .compact-action-button.copied {
        background: rgba(0, 102, 204, 0.08);
        border-color: var(--accent-color);
        text-decoration: none;
    }

    #status-epilepticus .status-source {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-weight: 600;
    }

    #status-epilepticus .status-protocol-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.85rem;
        margin: 1.25rem 0;
    }

    #status-epilepticus .status-step-card {
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-top: 4px solid var(--accent-color);
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 1px 4px var(--shadow-color);
    }

    #status-epilepticus .status-step-card.urgent {
        border-top-color: #ff9500;
    }

    #status-epilepticus .status-step-card.critical {
        border-top-color: #d70015;
    }

    #status-epilepticus .status-step-time {
        color: var(--text-secondary);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    #status-epilepticus .status-step-card h4 {
        color: var(--primary-color);
        font-size: 1rem;
        margin: 0.35rem 0 0.65rem;
    }

    #status-epilepticus .status-step-card ul {
        margin: 0;
        padding-left: 1rem;
    }

    #status-epilepticus .status-step-card li {
        font-size: 0.9rem;
        line-height: 1.45;
        margin-bottom: 0.45rem;
    }

    #status-epilepticus .details-subheading {
        margin-top: 1.5rem;
    }

    #status-epilepticus .status-table tbody td:first-child {
        color: var(--primary-color);
        font-weight: 600;
        min-width: 11rem;
    }

    #anti-seizure-medications .asm-reference-tools {
        background: var(--info-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        display: grid;
        gap: 0.9rem;
        margin: 1rem 0;
        padding: 1rem;
        box-shadow: 0 1px 4px var(--shadow-color);
    }

    #anti-seizure-medications .asm-tools-header {
        align-items: flex-start;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
    }

    #anti-seizure-medications .asm-tools-header h3 {
        color: var(--primary-color);
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0 0 0.2rem;
    }

    #anti-seizure-medications .asm-tools-header p {
        color: var(--text-secondary);
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;
    }

    #anti-seizure-medications .asm-search-row {
        align-items: stretch;
        display: grid;
        gap: 0.6rem;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #anti-seizure-medications .asm-search {
        align-items: center;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        display: grid;
        gap: 0.65rem;
        grid-template-columns: auto minmax(0, 1fr);
        padding: 0.7rem 0.85rem;
        min-height: 44px;
    }

    #anti-seizure-medications .asm-search i {
        color: var(--text-secondary);
    }

    #anti-seizure-medications .asm-search input {
        appearance: none;
        background: transparent;
        border: 0;
        color: var(--text-color);
        font: inherit;
        font-size: 0.98rem;
        outline: none;
        min-width: 0;
        width: 100%;
    }

    #anti-seizure-medications .asm-search:focus-within {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    #anti-seizure-medications .asm-filter-group {
        align-items: center;
        display: flex;
        gap: 0.75rem;
    }

    #asm-results-count {
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
        padding-top: 0.1rem;
    }

    .asm-filter-label {
        color: var(--text-secondary);
        flex: 0 0 auto;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .clear-asm-filters {
        appearance: none;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--primary-color);
        cursor: pointer;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 700;
        min-height: 44px;
        padding: 0 0.95rem;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .clear-asm-filters:hover {
        background: rgba(0, 102, 204, 0.08);
        border-color: var(--accent-color);
        color: var(--accent-color);
        text-decoration: none;
    }

    .asm-no-results {
        align-items: center;
        background: var(--bg-color);
        border: 1px dashed var(--border-color);
        border-radius: 8px;
        color: var(--text-secondary);
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin: 0.75rem 0;
        padding: 0.9rem;
        text-align: center;
    }

    .asm-no-results[hidden] {
        display: none;
    }



    /* Table Container */
    .table-container {
        max-width: 100%;
        overflow-x: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px var(--shadow-color);
        margin-bottom: 1.5rem;
    }

    /* Card-based view for medication details */
    .med-card {
        background: var(--info-bg);
        border-radius: 8px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 2px 8px var(--shadow-color);
        position: relative;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .med-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--shadow-color);
    }

    .med-card h3 {
        color: var(--primary-color);
        margin-top: 0;
        margin-bottom: 1rem;
        font-size: 1.3rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .med-card h3 .med-category {
        font-size: 0.9rem;
        background: var(--accent-color);
        color: #fff;
        padding: 0.3rem 0.7rem;
        border-radius: 12px;
        font-weight: 500;
    }

    /* Dose table in med card */
    .med-card .dose-table {
        margin-top: 1rem;
        width: 100%;
        border-collapse: collapse;
    }

    .med-card .dose-table th,
    .med-card .dose-table td {
        text-align: left;
        padding: 8px 10px;
        border-bottom: 1px solid var(--border-color);
    }

    .med-card .dose-table th {
        background-color: var(--bg-color);
        color: var(--primary-color);
        font-weight: 600;
    }

    /* Special considerations section */
    .special-considerations {
        background-color: rgba(255, 193, 7, 0.1);
        border-left: 3px solid #ffc107;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 0 8px 8px 0;
    }

    .special-considerations h4 {
        color: #d39e00;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    /* Drug interactions section */
    .drug-interactions {
        background-color: rgba(220, 53, 69, 0.1);
        border-left: 3px solid #dc3545;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 0 8px 8px 0;
    }

    .drug-interactions h4 {
        color: #dc3545;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    /* No results message */
    .no-results {
        text-align: center;
        padding: 2rem;
        background-color: var(--info-bg);
        border-radius: 8px;
        margin: 2rem auto;
        max-width: 600px;
    }

    .no-results i {
        font-size: 3rem;
        color: var(--accent-color);
        margin-bottom: 1rem;
    }

    .no-results h3 {
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }

    .no-results p {
        color: var(--text-secondary);
    }

    /* Animations for medication cards */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #medicationsTableBody tr {
        opacity: 0;
    }

    #medicationsTableBody tr.card-visible {
        animation: fadeInUp 0.5s ease forwards;
    }

    /* Quick Links Dropdown Styles */
    #seizure-management .quick-links-dropdown-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
        padding: 1rem;
        background: var(--info-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 1px 4px var(--shadow-color);
        position: sticky;
        top: 64px;
        z-index: 20;
    }

    #seizure-management .dropdown-label {
        font-size: 15px;
        font-weight: 600;
        color: var(--primary-color);
        white-space: nowrap;
    }

    #seizure-management .quick-links-dropdown {
        flex: 1;
        max-width: 400px;
        padding: 12px 16px;
        font-size: 15px;
        font-weight: 500;
        color: var(--text-color);
        background-color: var(--bg-color);
        border: 2px solid var(--border-color);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        background-size: 12px;
        padding-right: 40px;
    }

    #seizure-management .quick-links-dropdown:hover {
        border-color: var(--accent-color);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
    }

    #seizure-management .quick-links-dropdown:focus {
        outline: none;
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    /* Dark mode styles for dropdown */
    body.dark #seizure-management .quick-links-dropdown-container {
        background: var(--info-bg);
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    body.dark #seizure-management .dropdown-label {
        color: var(--text-color);
    }

    body.dark #seizure-management .quick-links-dropdown {
        background-color: var(--bg-color);
        border-color: var(--border-color);
        color: var(--text-color);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    }

    body.dark #seizure-management .quick-links-dropdown:hover {
        border-color: var(--accent-color);
        box-shadow: 0 2px 8px rgba(41, 151, 255, 0.2);
    }

    body.dark #seizure-management .quick-links-dropdown:focus {
        box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.15);
    }

    body.dark #status-epilepticus .status-step-card,
    body.dark #anti-seizure-medications .asm-reference-tools,
    body.dark #anti-seizure-medications .asm-search {
        background: rgba(255, 255, 255, 0.04);
        border-color: var(--border-color);
    }

    /* ASM Filter Styles */
    .asm-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
        justify-content: center;
    }

    .filter-checkbox {
        display: inline-block;
        padding: 0.5rem 0.875rem;
        background-color: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        font-size: 0.8rem;
        transition: all 0.2s ease;
        text-align: center;
        min-width: auto;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .filter-checkbox:hover {
        border-color: var(--accent-color);
        background-color: rgba(0, 102, 204, 0.08);
    }

    /* Hide checkbox visually but keep it accessible */
    .filter-checkbox input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    /* Active states using the checkbox state */
    .filter-checkbox input:checked+span {
        font-weight: 600;
    }

    .filter-checkbox:focus-within {
        outline: 2px solid var(--accent-color);
        outline-offset: 3px;
    }

    body.dark .filter-checkbox {
        background-color: rgba(41, 151, 255, 0.15);
    }

    body.dark .filter-checkbox:hover {
        background-color: rgba(41, 151, 255, 0.25);
    }

    /* Active state using class instead of directly styling the checkbox */
    .filter-checkbox.active {
        background-color: var(--accent-color);
        color: white;
        border-color: var(--accent-color);
        box-shadow: 0 1px 4px rgba(0, 102, 204, 0.2);
    }

    /* Hide rows based on data attributes */
    tr.hidden-by-filter {
        display: none;
    }

    .table-scroll {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compact-table {
        font-size: 0.9em;
    }

    .section-note {
        font-size: 0.9em;
        margin-bottom: 1rem;
        color: var(--text-secondary);
    }

    #pregnancy-epilepsy .registry-table {
        table-layout: fixed;
        width: 100%;
    }

    #pregnancy-epilepsy .registry-table th:first-child,
    #pregnancy-epilepsy .registry-table td:first-child {
        width: 36%;
    }

    #pregnancy-epilepsy .registry-table th:not(:first-child),
    #pregnancy-epilepsy .registry-table td:not(:first-child) {
        width: 21.333%;
    }

    #pregnancy-epilepsy .registry-control-row {
        background-color: var(--bg-color);
        color: var(--text-secondary);
        display: table-row;
        width: auto;
    }

    #pregnancy-epilepsy .registry-control-row td {
        display: table-cell;
    }

    /* Mobile responsive improvements */
    @media (max-width: 768px) {
        #seizure-management .workflow-navigation {
            top: 72px;
        }

        #seizure-management .workflow-tabs {
            display: none;
        }

        #seizure-management .workflow-navigation .dropdown-label,
        #seizure-management .workflow-navigation .quick-links-dropdown {
            display: block;
        }

        #seizure-management .workflow-navigation .quick-links-dropdown {
            max-width: none;
            width: 100%;
        }

        #status-epilepticus .status-protocol-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .asm-filters {
            gap: 0.375rem;
            margin-bottom: 0;
        }

        #anti-seizure-medications .asm-tools-header,
        #anti-seizure-medications .asm-search-row,
        #anti-seizure-medications .asm-filter-group {
            display: grid;
            grid-template-columns: 1fr;
        }

        #anti-seizure-medications .asm-filter-group {
            gap: 0.45rem;
        }

        .filter-checkbox {
            padding: 0.4rem 0.75rem;
            min-width: auto;
            flex: 1;
            font-size: 0.75rem;
        }

        /* Ensure filters work with responsive table/card layout */
        .custom-table[data-mobile-cards="true"] tr.hidden-by-filter {
            display: none !important;
        }

        /* Improve touch targets for mobile */
        .filter-checkbox input {
            height: 1px;
            width: 1px;
        }
    }

    @media (max-width: 480px) {
        .asm-filters {
            gap: 0.25rem;
            margin-bottom: 0.75rem;
        }

        .filter-checkbox {
            padding: 0.375rem 0.625rem;
            font-size: 0.7rem;
            border-radius: 4px;
        }

        #status-epilepticus .status-protocol-grid {
            grid-template-columns: 1fr;
        }

        #anti-seizure-medications .asm-reference-tools {
            padding: 0.75rem;
        }

        #anti-seizure-medications .asm-tools-header {
            gap: 0.4rem;
        }
    }



    /* ASM Withdrawal Section Specific Styling */
    #asm-withdrawal .asm-withdrawal-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    #asm-withdrawal .intro-text {
        font-size: 1.1rem;
        line-height: 1.7;
        color: var(--text-color);
        margin-bottom: 0;
    }

    #asm-withdrawal .considerations-box {
        background: rgba(0, 102, 204, 0.05);
        border-left: 4px solid var(--accent-color);
        border-radius: 8px;
        padding: 1.5rem;
        margin: 0;
    }

    #asm-withdrawal .considerations-box h3 {
        color: var(--primary-color);
        font-size: 1.3rem;
        font-weight: 600;
        margin: 0 0 1.25rem 0;
        padding: 0;
    }

    #asm-withdrawal .considerations-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
    }

    #asm-withdrawal .considerations-list li {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        font-size: 1rem;
        line-height: 1.6;
        color: var(--text-color);
        padding: 0;
    }

    #asm-withdrawal .considerations-list li i {
        color: var(--accent-color);
        font-size: 1.1rem;
        margin-top: 0.2rem;
        flex-shrink: 0;
    }

    #asm-withdrawal .prediction-tool-section {
        background: rgba(0, 102, 204, 0.03);
        border-radius: 8px;
        padding: 1.5rem;
        text-align: center;
        border: 1px solid rgba(0, 102, 204, 0.1);
    }

    #asm-withdrawal .tool-description {
        font-size: 1rem;
        line-height: 1.6;
        color: var(--text-secondary);
        margin: 0 0 1.5rem 0;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    #asm-withdrawal .tool-button-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Dark mode for ASM withdrawal */
    body.dark #asm-withdrawal .considerations-box {
        background: rgba(41, 151, 255, 0.1);
        border-left-color: var(--accent-color);
    }

    body.dark #asm-withdrawal .considerations-box h3 {
        color: var(--text-color);
    }

    body.dark #asm-withdrawal .considerations-list li i {
        color: var(--accent-color);
    }

    body.dark #asm-withdrawal .prediction-tool-section {
        background: rgba(41, 151, 255, 0.08);
        border-color: rgba(41, 151, 255, 0.2);
    }

    body.dark #asm-withdrawal .tool-description {
        color: var(--text-secondary);
    }

    /* Action Button Styling */
    .action-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        background-color: var(--accent-color);
        color: white;
        font-weight: 600;
        font-size: 1rem;
        padding: 12px 22px;
        border-radius: 8px;
        text-decoration: none;
        box-shadow: 0 1px 4px rgba(0, 102, 204, 0.25);
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
        border: none;
        cursor: pointer;
    }

    .action-button i {
        font-size: 1.2rem;
    }

    .action-button:hover {
        background-color: var(--accent-hover);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
    }

    .action-button:active {
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
    }

    body.dark .action-button {
        box-shadow: 0 4px 12px rgba(41, 151, 255, 0.3);
    }

    body.dark .action-button:hover {
        box-shadow: 0 6px 16px rgba(41, 151, 255, 0.4);
    }

    /* Mobile responsive for ASM withdrawal */
    @media (max-width: 768px) {
        #asm-withdrawal .asm-withdrawal-content {
            gap: 1.5rem;
        }

        #asm-withdrawal .intro-text {
            font-size: 1rem;
        }

        #asm-withdrawal .considerations-box {
            padding: 1.25rem;
        }

        #asm-withdrawal .considerations-box h3 {
            font-size: 1.15rem;
            margin-bottom: 1rem;
        }

        #asm-withdrawal .considerations-list {
            gap: 0.75rem;
        }

        #asm-withdrawal .considerations-list li {
            font-size: 0.95rem;
            gap: 0.625rem;
        }

        #asm-withdrawal .prediction-tool-section {
            padding: 1.25rem;
        }

        #asm-withdrawal .tool-description {
            font-size: 0.95rem;
            margin-bottom: 1.25rem;
        }

        .action-button {
            padding: 12px 24px;
            font-size: 0.95rem;
            width: 100%;
            max-width: 300px;
        }
    }

    /* =========================================
   Pregnancy & Epilepsy Section Styling
   ========================================= */

    #pregnancy-epilepsy .pregnancy-section-content {
        max-width: 100%;
    }

    #pregnancy-epilepsy .intro-text {
        font-size: 1.1rem;
        line-height: 1.6;
        color: var(--text-color);
        margin-bottom: 2rem;
        padding: 1rem;
        background-color: rgba(0, 102, 204, 0.05);
        border-left: 4px solid var(--primary-color);
        border-radius: 4px;
    }

    /* Risk Stratification Table */
    #pregnancy-epilepsy .risk-stratification h3,
    #pregnancy-epilepsy .registry-data h3 {
        color: var(--primary-color);
        border-bottom: 2px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }

    /* Badges */
    .badge {
        display: inline-block;
        padding: 0.35em 0.65em;
        font-size: 0.75em;
        font-weight: 700;
        line-height: 1;
        color: #fff;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: 0.25rem;
    }

    .badge-high-risk {
        background-color: #ffebee;
        color: #c62828;
    }

    .badge-medium-risk {
        background-color: #fff3e0;
        color: #ef6c00;
    }

    .badge-low-risk {
        background-color: #e8f5e9;
        color: #2e7d32;
    }

    /* Guidelines Grid */
    .guidelines-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .guideline-card {
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-left: 4px solid var(--primary-color);
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 1px 4px var(--shadow-color);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .guideline-card:hover {
        border-color: var(--accent-color);
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    .guideline-card h4 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .guideline-card h4 i {
        font-size: 1.1rem;
        color: var(--accent-color);
        background: rgba(0, 102, 204, 0.1);
        padding: 8px;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .guideline-card p {
        margin-bottom: 0.75rem;
        font-size: 0.95rem;
        line-height: 1.5;
        color: var(--text-color);
    }

    .guideline-card p:last-child {
        margin-bottom: 0;
    }

    .guideline-card strong {
        color: var(--text-color);
        font-weight: 600;
    }

    /* Registry Data Table Tweaks */
    .registry-data table th {
        background-color: rgba(0, 102, 204, 0.05);
        color: var(--primary-color);
    }

    .reference-text {
        margin-top: 2rem;
        font-size: 0.85em;
        color: var(--text-secondary);
        font-style: italic;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }


    /* Dark Mode Overrides */
    body.dark #pregnancy-epilepsy .intro-text {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text-color);
        border-left-color: var(--accent-color);
    }

    body.dark .guideline-card {
        background: var(--bg-secondary, #1e1e1e);
        border-color: var(--border-color);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    body.dark .guideline-card h4 i {
        background: rgba(41, 151, 255, 0.15);
        color: var(--accent-color);
    }

    body.dark .badge-high-risk {
        background-color: rgba(198, 40, 40, 0.2);
        color: #ff8a80;
    }

    body.dark .badge-medium-risk {
        background-color: rgba(239, 108, 0, 0.2);
        color: #ffcc80;
    }

    body.dark .badge-low-risk {
        background-color: rgba(46, 125, 50, 0.2);
        color: #a5d6a7;
    }

    body.dark .risk-stratification h3,
    body.dark .registry-data h3 {
        border-bottom-color: rgba(255, 255, 255, 0.1);
        color: var(--text-color);
    }

    body.dark .registry-data table th {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text-color);
    }

    body.dark #pregnancy-epilepsy .registry-control-row {
        background-color: rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
    }

    @media (max-width: 768px) {
        #seizure-management .page-title {
            font-size: 2rem;
            margin: 1.5rem 0;
        }

        #seizure-management .quick-links-dropdown-container {
            flex-direction: column;
            align-items: stretch;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            padding: 1rem;
            top: 72px;
        }

        #seizure-management .dropdown-label {
            font-size: 14px;
            text-align: left;
        }

        #seizure-management .quick-links-dropdown {
            width: 100%;
            max-width: 100%;
            padding: 14px 45px 14px 16px;
            font-size: 16px;
        }

        #seizure-management .info-box {
            padding: 0.75rem;
            margin-bottom: 0.75rem;
            border-radius: 4px;
        }

        #seizure-management .section-header {
            font-size: 1.1rem;
            padding: 0.6rem 0;
        }

        #seizure-management .custom-table[data-mobile-cards="true"] {
            display: block;
            overflow: visible;
        }

        .guidelines-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .guideline-card {
            padding: 1rem;
        }
    }

    @media (max-width: 480px) {
        #seizure-management .page-title {
            font-size: 1.75rem;
        }

    }

    @media print {
        body * {
            visibility: hidden;
        }

        #status-epilepticus,
        #status-epilepticus * {
            visibility: visible;
        }

        #status-epilepticus {
            left: 0;
            position: absolute;
            top: 0;
            width: 100%;
        }

        #status-epilepticus .status-actions,
        #status-epilepticus .clinical-reference-section {
            display: none;
        }
    }
