/**
 * Nexts Custom Frappe Theme
 * - Slightly larger typography (+0px vs default, tuned down from prior scale)
 * - Zero border-radius across the UI
 */

:root,
[data-theme="light"],
[data-theme="dark"] {
    /* ── Typography scale (Frappe default +0, sidebar uses --text-sm) ── */
    --text-tiny: 10px;
    --text-2xs: 12px;
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-base: 14px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 20px;
    --text-3xl: 24px;
    --text-4xl: 26px;
    --text-5xl: 28px;
    --text-6xl: 32px;
    --text-7xl: 40px;
    --text-8xl: 44px;
    --text-9xl: 48px;
    --text-10xl: 52px;
    --text-11xl: 56px;
    --text-12xl: 64px;

    /* Website / Bootstrap font-size tokens */
    --font-size-xs: 0.8125rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 2.75rem;
    --font-size-6xl: 3.75rem;

    /* ── Border radius: flat / square UI ── */
    --border-radius-tiny: 0;
    --border-radius-sm: 0;
    --border-radius: 0;
    --border-radius-md: 0;
    --border-radius-lg: 0;
    --border-radius-xl: 0;
    --border-radius-2xl: 0;
    --border-radius-full: 0;
    --card-border-radius: 0;

    /* Layout scale */
    --btn-height: 30px;
    --input-height: 30px;
    --checkbox-size: 14px;
    --navbar-height: 48px;
    --page-head-height: 48px;
    --desktop-navbar-height: 48px;
    --desktop-modal-radius: 0;

    /* System default fonts — no Inter / custom webfont */
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

html,
body {
    font-size: 16px;
    font-family: var(--font-stack);
    font-variation-settings: normal;
}

/* Catch hardcoded border-radius values not using CSS variables */
.btn,
.form-control,
.input-with-feedback,
.awesomplete > ul,
.modal-content,
.modal-header,
.modal-body,
.modal-footer,
.dropdown-menu,
.card,
.frappe-card,
.widget,
.list-row-container,
.list-row,
.form-section,
.form-dashboard-section,
.grid-heading-row,
.grid-row,
.dt-scrollable,
.frappe-list,
.page-form,
.sidebar-menu,
.desk-sidebar,
.standard-sidebar,
.layout-side-section,
.comment-box,
.timeline-item,
.toast,
.indicator-pill,
.badge,
.pill,
.tag-pill,
.filter-pill,
.nav-link,
.pagination .page-link,
.selectable-row,
.frappe-control .control-input,
.frappe-control .ql-editor,
.frappe-control .ql-toolbar,
.frappe-control .ql-container,
.input-group-text,
.custom-checkbox,
.custom-switch,
.switch,
.awesomplete-input,
.search-bar .search-input,
#navbar-search,
.frappe-datatable .dt-cell,
.frappe-datatable .dt-header,
.kanban-column,
.kanban-card,
.workspace-sidebar,
.shortcut-widget,
.number-widget,
.onboarding-widget,
.chart-container,
.popover,
.tooltip-inner,
.awesomplete > ul > li,
.file-upload-area,
.attachments-upload-area,
.web-form-wrapper,
.web-form-header,
.web-form-footer,
.web-form .form-control,
.web-form .btn,
.portal-section,
.page-card,
.navbar,
.navbar-container,
.desktop-navbar,
.search-widget-button,
.search-widget-wrapper,
.search-icon,
.sidebar-header,
.header-logo,
.header-logo-container,
.header-logo .icon-container,
.footer-subscribe,
input,
textarea,
select,
button {
    border-radius: 0 !important;
}

.avatar,
.avatar-frame,
.avatar img,
.standard-image,
.indicator,
.indicator-dot,
.comment-avatar,
.user-image,
img.avatar {
    border-radius: 0 !important;
}

/* ── Top bars (Desktop home + page head) ── */

.desktop-navbar.navbar-container,
header.navbar-container {
    height: var(--desktop-navbar-height) !important;
    min-height: var(--desktop-navbar-height) !important;
    font-size: var(--text-base) !important;
}

.desktop-navbar .search-widget-button,
.navbar .search-widget-button,
.page-head .search-widget-button {
    border-radius: 0 !important;
    min-height: var(--btn-height);
    font-size: var(--text-sm) !important;
}

.navbar .search-bar .search-icon,
.navbar-modal-search-mobile .search-icon {
    border-radius: 0 !important;
}

.navbar {
    height: var(--navbar-height) !important;
    min-height: var(--navbar-height) !important;
}

.navbar .nav-item,
.navbar .nav-link,
.navbar-breadcrumbs,
.navbar-breadcrumbs .breadcrumb-item {
    font-size: var(--text-sm) !important;
}

.page-head .page-head-content {
    height: var(--page-head-height);
    font-size: var(--text-base) !important;
}

.page-head .navbar-breadcrumbs,
.page-head .page-title {
    font-size: var(--text-sm) !important;
}

.desktop-avatar .avatar,
.desktop-avatar .avatar-frame,
.desktop-avatar .avatar img,
.desktop-avatar .standard-image {
    border-radius: 0 !important;
}

/* ── Brand logo (Desktop navbar) ── */

#brand-logo,
.desktop-navbar .navbar-home img,
.desktop-navbar #brand-logo {
    height: 48px !important;
    width: auto !important;
    max-height: 48px !important;
}

/* ── Login page logo ── */
/* login.bundle.css loads after web_include_css — use !important */

.page-card-head {
    align-items: center !important;
    text-align: center !important;
}

.page-card-head img.app-logo {
    height: 100px !important;
    max-height: none !important;
    width: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.page-card-head .page-card-head-text {
    align-self: stretch;
    text-align: center;
}
