/* ==========================================================================
   EBS CLINICAL TOOLS & INSTRUMENTS HUB CSS
   Esthetical B-School • Mobile-First Luxury White & Gold Aesthetic
   ========================================================================== */

/* Tools Hub View */
.tools-hero {
    background: linear-gradient(135deg, #fbf9f5 0%, #f4ede0 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.tools-hero::after {
    content: "🧰";
    position: absolute;
    right: 12px;
    bottom: -8px;
    font-size: 54px;
    opacity: 0.12;
    pointer-events: none;
}

.tools-hero-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gold-dark);
    background: rgba(255, 255, 255, 0.85);
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 8px;
}

.tools-hero-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 6px;
}

.tools-hero-desc {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 0;
}

/* Legal Disclaimer in Tools */
.tools-disclaimer {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: #78350f;
    line-height: 1.35;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Category Filter Pills */
.tools-filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tools-filters-scroll::-webkit-scrollbar { display: none; }

.tool-filter-pill {
    white-space: nowrap;
    padding: 7px 13px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-filter-pill.active {
    background: var(--gold-dark);
    color: #ffffff;
    border-color: var(--gold-dark);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

/* Tools Grid */
.tools-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.tool-card-luxury {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.tool-card-luxury:active {
    transform: scale(0.985);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tool-card-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.tool-card-icon-wrap.emergency {
    background: #fee2e2;
    border-color: #fca5a5;
}

.tool-card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tool-card-badge.clinical {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.tool-card-badge.emergency {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.tool-card-badge.business {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.tool-card-badge.anatomy {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.tool-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.tool-card-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 10px;
}

.tool-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tool-chip {
    font-size: 10.5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 5px;
    color: #475569;
}

.tool-open-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fbf9f5 0%, #f4ede0 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tool-open-btn.emergency {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* ==========================================================================
   INTERACTIVE TOOL MODALS / SHEETS
   ========================================================================== */
.tool-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 250;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.tool-modal-overlay.active {
    display: flex;
}

.tool-modal-sheet {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tool-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.tool-sheet-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-sheet-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.tool-sheet-body {
    padding: 16px 18px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Calculator Inputs & Pills */
.tool-group-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    display: block;
}

.tool-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tool-select-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tool-select-pill.active {
    background: var(--gold-dark);
    color: #ffffff;
    border-color: var(--gold-dark);
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.25);
}

.tool-select-pill small {
    display: block;
    font-size: 10px;
    opacity: 0.85;
    font-weight: 400;
}

/* Tool Result Cards */
.tool-result-box {
    background: linear-gradient(135deg, #fdfbf7 0%, #f6efe2 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
}

.tool-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.tool-stat-block {
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.tool-stat-block.highlight {
    background: #fffdf5;
    border-color: var(--gold-dark);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.12);
}

.tool-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.tool-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-dark);
    line-height: 1.1;
}

.tool-stat-value small {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* Slider Controls */
.tool-slider-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}

.tool-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tool-slider-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-dark);
}

.tool-range-input {
    width: 100%;
    accent-color: var(--gold-dark);
    cursor: pointer;
    height: 6px;
    border-radius: 4px;
    outline: none;
    margin: 8px 0;
}

.tool-badge-callout {
    background: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    color: #334155;
    margin-top: 10px;
}

.tool-badge-callout strong {
    color: var(--gold-dark);
    font-size: 16px;
}

/* Zone Reference Accordions */
.tool-reference-section {
    margin-top: 16px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.tool-ref-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-ref-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-ref-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}

.tool-ref-name {
    font-weight: 700;
    color: var(--text-main);
}

.tool-ref-sub {
    font-size: 11px;
    color: #64748b;
}

.tool-ref-dose {
    font-weight: 800;
    color: var(--gold-dark);
    background: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    white-space: nowrap;
}

/* Emergency Mode & Pulsed Timer */
.emergency-timer-banner {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #f87171;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    margin-bottom: 16px;
}

.emergency-timer-display {
    font-family: monospace;
    font-size: 38px;
    font-weight: 900;
    color: #b91c1c;
    letter-spacing: 2px;
    margin: 6px 0;
}

.emergency-timer-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.btn-timer {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-timer-start {
    background: #dc2626;
    color: #ffffff;
}

.btn-timer-reset {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.emergency-step-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.emergency-step-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    color: #7f1d1d;
    line-height: 1.35;
}

.emergency-step-num {
    background: #ef4444;
    color: #ffffff;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Danger Zones Visuals */
.danger-zone-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.danger-zone-card.critical {
    border-left: 4px solid #ef4444;
}

.danger-zone-card.high {
    border-left: 4px solid #f59e0b;
}

.danger-zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.danger-zone-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.danger-zone-risk {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.danger-zone-risk.critical { background: #fee2e2; color: #b91c1c; }
.danger-zone-risk.high { background: #fef3c7; color: #92400e; }

.danger-zone-vessel {
    font-size: 11.5px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
}

.danger-zone-desc {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 6px;
}

.danger-zone-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.danger-zone-tag {
    font-size: 10.5px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
    font-weight: 600;
}

/* ==========================================================================
   DIPLOMAS DEDICATED VIEW STYLING
   ========================================================================== */
.diplomas-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 18px;
    padding: 20px 16px;
    margin-bottom: 20px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.diplomas-hero::after {
    content: "📜";
    position: absolute;
    right: 12px;
    bottom: -10px;
    font-size: 64px;
    opacity: 0.15;
    pointer-events: none;
}

.diplomas-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.4);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.diplomas-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 6px;
}

.diplomas-hero-desc {
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.45;
    margin-bottom: 14px;
}

.diplomas-stats-row {
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 12px;
}

.diploma-stat-item {
    display: flex;
    flex-direction: column;
}

.diploma-stat-num {
    font-size: 20px;
    font-weight: 900;
    color: #facc15;
    line-height: 1;
}

.diploma-stat-lbl {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Quick Banner in Cabinet */
.diploma-quick-banner {
    background: linear-gradient(135deg, #fdfbf7 0%, #f7f1e6 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease;
}

.diploma-quick-banner:active {
    transform: scale(0.985);
}

.diploma-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diploma-banner-icon {
    font-size: 24px;
}

.diploma-banner-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.diploma-banner-sub {
    font-size: 11px;
    color: var(--gold-dark);
    font-weight: 600;
}

.diploma-banner-arrow {
    color: var(--gold-dark);
    font-size: 18px;
    font-weight: 800;
}

/* Inline Verification Box inside Diplomas tab */
.diploma-inline-verify {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin-top: 24px;
}

.diploma-verify-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.diploma-verify-sub {
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.35;
}

.diploma-verify-input-group {
    display: flex;
    gap: 8px;
}

.diploma-verify-input {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    font-weight: 600;
}

.diploma-verify-btn {
    background: var(--gold-dark);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
