/* Shared controls. Loaded last so themes cannot invent extra button colors. */

html .visit-btn,
html .export-btn,
html .report-ok-btn,
html .action-btn,
html .fullscreen-btn,
html .dock-prompt-btn,
html .setup-status-btn,
html .record-banner-back,
html .logout-btn,
html .password-submit,
html .sso-btn.password-submit,
html button.visit-btn,
html button.export-btn,
html button.report-ok-btn,
html button.action-btn,
html button.fullscreen-btn,
html button.dock-prompt-btn,
html button.setup-status-btn,
html button.record-banner-back,
html button.password-submit,
html a.logout-btn {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    margin: 0;
    padding: 6px 14px !important;
    min-height: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    background: var(--accent) !important;
    color: var(--btn-ink) !important;
    font: inherit;
    font-size: 0.95em;
    font-weight: 650 !important;
    line-height: 1.15;
    box-shadow: none !important;
    cursor: pointer;
}

html .visit-btn:hover:not(:disabled),
html .export-btn:hover:not(:disabled),
html .report-ok-btn:hover:not(:disabled),
html .action-btn:hover:not(:disabled),
html .fullscreen-btn:hover:not(:disabled),
html .dock-prompt-btn:hover:not(:disabled),
html .setup-status-btn:hover:not(:disabled),
html .record-banner-back:hover:not(:disabled),
html .logout-btn:hover,
html .password-submit:hover:not(:disabled),
html .sso-btn.password-submit:hover:not(:disabled) {
    background: var(--accent-hover) !important;
    color: var(--btn-ink) !important;
}

html .visit-btn:disabled,
html .export-btn:disabled,
html .report-ok-btn:disabled,
html .action-btn:disabled,
html .fullscreen-btn:disabled,
html .dock-prompt-btn:disabled,
html .setup-status-btn:disabled,
html .record-banner-back:disabled,
html .password-submit:disabled,
html .sso-btn.password-submit:disabled {
    background: #e8eaed !important;
    color: #d0d4dc !important;
    border: none !important;
    font-weight: 400 !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.action-btn.nav-arrow {
    min-width: 32px !important;
    padding: 6px 10px !important;
}

.record-btn.recording {
    background: var(--record-active) !important;
    color: #fff !important;
}

.record-btn.recording:hover:not(:disabled) {
    background: var(--record-active-hover) !important;
    color: #fff !important;
}

html .tab-bar {
    background: transparent !important;
    border-bottom: 2px solid var(--field-border) !important;
    gap: 4px 6px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 6px 8px 0 !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

html .tab-btn,
html .tab-bar .tab-btn,
html .note-view-bar .tab-btn,
html .note-view-bar .note-view-tab,
html .section-tab-bar .tab-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    color: var(--muted) !important;
    border: 2px solid transparent !important;
    border-bottom-width: 0 !important;
    border-radius: 10px 10px 0 0 !important;
    min-height: 0 !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

html .tab-btn:hover,
html .tab-bar .tab-btn:hover,
html .note-view-bar .tab-btn:hover,
html .section-tab-bar .tab-btn:hover {
    background: transparent !important;
    color: var(--text) !important;
}

html .tab-btn.is-active,
html .tab-bar .tab-btn.is-active,
html .note-view-bar .tab-btn.is-active,
html .note-view-bar .note-view-tab.is-active,
html .section-tab-bar .tab-btn.is-active {
    background: var(--panel) !important;
    color: var(--text) !important;
    border: 2px solid var(--field-border) !important;
    border-bottom-color: var(--panel) !important;
    margin-bottom: -2px !important;
    z-index: 2;
}

html .tab-widget > .tab-panels {
    border: 2px solid var(--field-border) !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px;
    min-width: 0;
    overflow: hidden;
}

html #noteViewSections .visit-btn,
html #noteViewSections button.visit-btn,
html .note-view-actions .visit-btn,
html .icd-block .visit-btn {
    padding: 8px 16px !important;
    min-height: 0 !important;
    font-size: 0.92em !important;
}

.tab-panel .text-box,
.note-rich,
.note-section-body,
.setup-add input,
.setup-add select,
.setup-password input,
.setup-role-select,
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
select,
textarea {
    background: var(--field-bg) !important;
    color: var(--text) !important;
    border: 2px solid var(--field-border) !important;
}

.tab-panel .text-box:focus,
.note-rich:focus,
.note-section-body:focus,
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
