@import (reference) "rb/css/syntax.less";
@import (reference) "rb/css/ui/boxes.less";
@import (reference) "rb/css/ui/colors.less";
@import (reference) "rb/css/ui/datagrids.less";
@import (reference) "rb/css/ui/forms.less";
@import (reference) "rb/css/ui/inline-editor.less";
@import (reference) "rb/css/ui/page-sidebar.less";
@import (reference) "rb/css/ui/sidebars.less";


/**
 * The default font family.
 *
 * Deprecated:
 *     7.0:
 *     Use ``var(--ink-ff-default)`` from Ink instead.
 */
@font-family: var(--ink-ff-default);


/* RB Colors */

@default-text-color: #rb-ns-ui.colors[@black];


/**
 * Draft-related colors.
 *
 * Deprecated:
 *     7.0:
 *     Use ``var(--rb-p-draft-*)`` variables instead.
 */
@draft-color: #rb-ns-ui.colors[@green-80];
@draft-hover-color: darken(@draft-color, 15%);
@draft-border-color: #rb-ns-ui.colors[@green-50];


/**
 * The color used for links.
 *
 * Deprecated:
 *     7.0:
 *     Use ``var(--ink-p-link-fg)`` from Ink instead.
 */
@link-color: #rb-ns-ui.colors[@blue-20];

@alert-color: #rb-ns-ui.colors[@yellow-70];


/**
 * Form definitions.
 *
 * Deprecated:
 *     4.0:
 *     These have been replaced by definitions in ``#rb-ns-ui.form-field``.
 */
@required-flag-color: #rb-ns-ui.form-field[@required-flag-color];
@admin_font_size: 11px;
@admin-help-text-color: #rb-ns-ui.form-field[@help-text-color];
@textarea-font-size: #rb-ns-ui.form-field[@textarea-font-size];
@textarea-font-family: #rb-ns-ui.form-field[@textarea-font-family];
@textarea-border-color: #rb-ns-ui.form-field[@textarea-border-color];
@textarea-border-size: #rb-ns-ui.form-field[@textarea-border-size];
@textarea-border: #rb-ns-ui.form-field[@textarea-border];
@textarea-editor-background: #rb-ns-ui.form-field[@textarea-editor-background];
@textarea-editor-margin-top: #rb-ns-ui.form-field[@textarea-editor-margin-top];
@textarea-editor-margin: #rb-ns-ui.form-field[@textarea-editor-margin];
@textarea-editor-padding: #rb-ns-ui.form-field[@textarea-editor-padding];
@textarea-line-height: @textarea-font-size + 4px;


@page-container-padding: 1.5em;

@headerbar-logo-padding-horiz: 8px;
@headerbar-logo-width: 60px;
@headerbar-padding-left: @headerbar-logo-width +
                         2 * @headerbar-logo-padding-horiz;
@headerbar-padding: 5px;
@headerbar-menu-min-width: 9em;

@read-only-banner-bg: @alert-color;
@read-only-banner-border-bottom: 1px darken(@read-only-banner-bg, 55%) solid;
@read-only-banner-padding-left: @headerbar-padding-left;
@read-only-banner-header-padding-right: 5px;


/**
 * Box definitions.
 *
 * Deprecated:
 *     4.0:
 *     These have been replaced by definitions in ``#rb-ns-ui.boxes``.
 */
@box-border-color: #rb-ns-ui.boxes[@border-color];
@box-border-radius: #rb-ns-ui.boxes[@border-radius];
@box-inner-border-radius: #rb-ns-ui.boxes[@inner-border-radius];
@box-title-bg: #rb-ns-ui.boxes[@title-bg];
@box-shadow: #rb-ns-ui.boxes[@shadow];
@box-padding: #rb-ns-ui.boxes[@padding];
@box-main-padding: #rb-ns-ui.boxes[@main-padding];
@box-bg: #rb-ns-ui.boxes[@bg];


/**
 * Inline Editor definitions.
 *
 * Deprecated:
 *     6.0:
 *     These have been replaced by definitions in ``#rb-ns-ui.inline-editor``.
 */
@edit-icon-margin: #rb-ns-ui.inline-editor[@edit-icon-margin];

@review-request-bg: #FEFADF;
@review-request-bg-gradient-start: lighten(@review-request-bg, 4%);
@review-request-bg-gradient-end: @review-request-bg;
@review-request-border-color: #rb-ns-ui.colors[@mustard-40];

@review-request-section-label-font-size: 12px;
@review-request-summary-font-size: 13px;

@review-request-action-bg: #E5D7A8;
@review-request-action-border-color: #rb-ns-ui.colors[@mustard-40];
@review-request-action-active-bg: darken(@review-request-action-bg, 20%);
@review-request-action-hover-bg: darken(@review-request-action-bg, 10%);

@review-request-action-primary-bg: @review-request-action-bg;
@review-request-action-primary-active-bg: @review-request-action-active-bg;
@review-request-action-primary-hover-bg: @review-request-action-hover-bg;

@review-request-action-menu-border-color: @review-request-action-border-color;
@review-request-action-menu-bg: @review-request-action-active-bg;
@review-request-action-menu-item-hover-bg: @review-request-action-hover-bg;
@review-request-action-line-height: 16px;
@review-request-action-padding-vert: 5px;
@review-request-action-padding-horiz-icon: 5px;
@review-request-action-padding-horiz-text: 10px;

@review-request-action-mobile-padding: 10px;

@review-request-field-border: @textarea-border;
@review-request-field-table-divider-border: 1px #DDDDDD solid;

@review-request-commit-list-bg: #FFFFFF;
@review-request-commit-list-link-color: #000000;
@review-request-commit-list-table-border: 1px #CCCCCC solid;

@review-request-label-color: #rb-ns-ui.colors[@mustard-10];

@review-request-warning-bg: #F5A9A9;
@review-request-warning-border-color: #FF0000;

// Review request entries
@review-request-entry-base-bg: #FFFFFF;
@review-request-entry-base-border-color: #rb-ns-ui.colors[@grey-60];
@review-request-entry-collapsed-bg: #ECECEE;
@review-request-entry-collapsed-border-color: #rb-ns-ui.colors[@grey-55];
@review-request-entry-padding: 12px;
@review-request-entry-new-border-color: #2278FC;
@review-request-entry-link-offset: -1em;
@review-request-entry-link-margin-left: -1px;
@review-request-entry-has-avatar-link-offset: 0;
@review-request-entry-has-avatar-link-margin-left: 0;

// Reviews
@reviews-padding-horiz: 0.5em;
@review-box-border-color: #999999;
@review-comment-author-color: #AB5603;
@review-comment-author-color-draft: #4E9A06;
@review-comment-border-left-size: 2px;
@review-comment-filename-background-color: #F0F0F0;
@review-comment-filename-border-color: #C0C0C0;
@review-comment-padding: 2em;
@review-comment-section-margin-top: (2 * @review-comment-padding);

// Review UIs
@review-ui-header-bg: @review-request-bg;

@admin-sidebar-width: 18em;

@admin-msg-banner-bg: #FFC;
@admin-msg-banner-border-color: darken(@admin-msg-banner-bg, 50%);

@issue-opened-bg: @alert-color;
@issue-opened-border-color: #rb-ns-ui.colors[@mustard-60];
@issue-opened-hover-bg: desaturate(darken(@issue-opened-bg, 10%), 20%);
@issue-opened-link-color: darken(@issue-opened-bg, 60%);
@issue-discarded-bg: #ECECEC;
@issue-discarded-border-color: darken(@issue-discarded-bg, 20%);
@issue-discarded-hover-bg: darken(@issue-discarded-bg, 5%);
@issue-discarded-link-color: darken(@issue-discarded-bg, 60%);
@issue-resolved-bg: #FAFAFA;
@issue-resolved-border-color: darken(@issue-resolved-bg, 10%);
@issue-resolved-hover-bg: darken(@issue-resolved-bg, 5%);
@issue-resolved-link-color: darken(@issue-resolved-bg, 60%);
@issue-verifying-bg: lighten(@issue-opened-bg, 5%);
@issue-verifying-hover-bg: desaturate(darken(@issue-verifying-bg, 10%), 20%);

@shipit-bg: #7feb14;
@shipit-border-color: #478a06;
@shipit-text-color: #202003;

@z-index-base: 1;
@z-index-deco: 20;
@z-index-event-overlay: 30;
@z-index-subevent-overlay: @z-index-event-overlay + 1;
@z-index-filter-overlay: 40;
@z-index-mobile-headerbar: 50;
@z-index-diff-collapse-btn: 90;
@z-index-banner: 100;
@z-index-menu-mask: 109;
@z-index-menu: 110;
@z-index-logo: 115;  /* Must sit above the draft mode menu. */
@z-index-dialog: 120;
@z-index-page-overlay: 130;
@z-index-spinner: 140;
@z-index-nav-menu-mask: 199;
@z-index-nav-menu: 200;
@z-index-dnd-overlay: 210;

// Icon dimensions
@rb-icon-edit-width: 20px;
@rb-icon-edit-height: 16px;

// Comment flags
@comment-flag-color: #rb-ns-ui.colors[@blue-60];
@comment-flag-hover-color: lighten(@comment-flag-color, 10%);
@comment-flag-border-color: #rb-ns-ui.colors[@blue-30];
@comment-flag-width: 1.6em;
@comment-flag-border-radius: @comment-flag-width;
@comment-flag-text-color: rgba(0, 0, 0, 0.7);

@comment-flag-draft-color: @draft-color;
@comment-flag-draft-hover-color: lighten(@draft-color, 10%);
@comment-flag-draft-border-color: @draft-border-color;

@comment-flag-ghost-color: #eeeeec;
@comment-flag-ghost-border-color: #888a85;

// Comment flag tooltip
@comments-tooltip-padding: 5px;
@comments-tooltip-border-color: #5170B3;
@comments-tooltip-background: @comment-flag-color;
@comments-tooltip-draft-background: @comment-flag-draft-color;

// Comment dialog
@comment-dlg-bg: @draft-color;
@comment-dlg-border-color: @draft-border-color;
@comment-dlg-padding: 6px;
@comment-dlg-other-comments-bg: #A1C0E3;

/* Diff styles */
@diff-file-color: #rb-ns-ui.colors[@grey-80];
@diff-border-color: @box-border-color;
@diff-file-border-color: #rb-ns-ui.colors[@grey-55];
@diff-line-border-color: #rb-ns-ui.colors[@grey-70];
@diff-error-color: @alert-color;
@diff-error-border-color: darken(@diff-error-color, 35%);

// Diff headers
@diff-header-color: #rb-ns-ui.colors[@blue-80];

// Moved line information
@diff-moved-from-bg-color: #b0d0ff;
@diff-moved-to-bg-color: darken(@diff-moved-from-bg-color, 3%);


/*
 * Diff equal lines.
 *
 * Deprecated:
 *     7.0:
 *     Consumers should use ``--rb-theme-diff-delete-*`` and
 *     ``--rb-p-diff-delete-*`` CSS variables instead.
 */
// Equals lines
@diff-background-color: @default-code-theme-light-diff-equal-bg;
@diff-linenum-color: @default-code-theme-light-diff-linenum-fg;
@diff-linenum-background-color: #F0F0F0;
@diff-selected-color: @default-code-theme-light-diff-equal-highlight-bg;


/*
 * Diff delete lines.
 *
 * Deprecated:
 *     7.0:
 *     Consumers should use ``--rb-theme-diff-delete-*`` and
 *     ``--rb-p-diff-delete-*`` CSS variables instead.
 */
@diff-delete-color: @default-code-theme-light-diff-delete-bg;
@diff-delete-border-color: desaturate(darken(@diff-delete-color, 9%), 55%);
@diff-delete-linenum-color: @default-code-theme-light-diff-linenum-fg;
@diff-delete-linenum-border-color:
  desaturate(darken(@diff-delete-linenum-color, 7%), 55%);
@diff-delete-selected-color: @default-code-theme-light-diff-delete-highlight-bg;
@diff-delete-dot-color: darken(@diff-delete-linenum-color, 4%);


/*
 * Diff insert lines.
 *
 * Deprecated:
 *     7.0:
 *     Consumers should use ``--rb-theme-diff-insert-*`` and
 *     ``--rb-p-diff-insert-*`` CSS variables instead.
 */
@diff-insert-color: @default-code-theme-light-diff-insert-bg;
@diff-insert-border-color: desaturate(darken(@diff-insert-color, 5%), 55%);
@diff-insert-linenum-color: @default-code-theme-light-diff-linenum-fg;
@diff-insert-linenum-border-color:
  desaturate(darken(@diff-insert-linenum-color, 7%), 35%);
@diff-insert-selected-color: @default-code-theme-light-diff-insert-highlight-bg;
@diff-insert-dot-color: desaturate(darken(@diff-insert-color, 35%), 35%);


/*
 * Diff replace lines.
 *
 * Deprecated:
 *     7.0:
 *     Consumers should use ``--rb-theme-diff-replace-*`` and
 *     ``--rb-p-diff-replace-*`` CSS variables instead.
 */
@diff-replace-color: @default-code-theme-light-diff-replace-bg;
@diff-replace-border-color: desaturate(darken(@diff-replace-color, 20%), 30%);
@diff-replace-linenum-color: @default-code-theme-light-diff-linenum-fg;
@diff-replace-linenum-border-color:
  desaturate(darken(@diff-replace-linenum-color, 10%), 30%);
@diff-replace-selected-color:
  @default-code-theme-light-diff-replace-highlight-bg;
@diff-replace-dot-color: darken(@diff-replace-color, 50%);

// Diff line counts
@diff-insert-line-count-color: darkgreen;
@diff-delete-line-count-color: darkred;

// Diff highlighted line
@diff-highlight-color: #F3CBFF;

// Revisions selector
@revisions-border-color: #999999;
@revisions-hover-color: #E7E0A2;
@revisions-hover-border-color: #003366;
@revisions-text-color: black;

// Pagination
@paginate-border-color: #DDDDDD;
@paginate-bg-color: #417690;
@paginate-text-color: #f4f379;

// Binary Files
@inline-actions-bg: darken(@diff-file-color, 3%);
@inline-actions-hover-bg: darken(@inline-actions-bg, 5%);


/**
 * DataGrid definitions.
 *
 * Deprecated:
 *     4.0:
 *     These have been replaced by definitions in ``#rb-ns-ui.datagrids``.
 */
@datagrid-bg: #rb-ns-ui.datagrids[@bg];
@datagrid-border-color: #rb-ns-ui.datagrids[@border-color];
@datagrid-filter-menu-bg: #rb-ns-ui.datagrids.filter-menu[@bg];
@datagrid-filter-menu-border-color:
  #rb-ns-ui.datagrids.filter-menu[@border-color];
@datagrid-paginator-bg: #rb-ns-ui.datagrids.paginator[@bg];
@datagrid-paginator-border-color: #rb-ns-ui.datagrids.paginator[@border-color];
@datagrid-actions-bg: #rb-ns-ui.datagrids.actions[@bg];
@datagrid-actions-offset-left: #rb-ns-ui.datagrids.actions[@offset-left];
@datagrid-header-bg: #rb-ns-ui.datagrids.header[@bg];
@datagrid-row-even-bg: #rb-ns-ui.datagrids.cells[@even-bg];
@datagrid-row-odd-bg: #rb-ns-ui.datagrids.cells[@bg];
@datagrid-row-border-color: #rb-ns-ui.datagrids.cells[@row-divider-color];


/**
 * Sidebar definitions.
 *
 * Deprecated:
 *     4.0:
 *     These have been replaced by definitions in ``#rb-ns-ui.sidebars`` and
 *     ``#rb-ns-ui.page-sidebar``.
 */
@page-sidebar-count-color: #rb-ns-ui.sidebars[@value-color];
@page-sidebar-count-zero-color: #rb-ns-ui.sidebars[@value-dimmed-color];
@page-sidebar-horiz-padding: #rb-ns-ui.sidebars[@padding-horiz];
@page-sidebar-vert-padding: #rb-ns-ui.sidebars[@padding-vert];
@page-sidebar-active-bg: #rb-ns-ui.sidebars[@active-bg];
@page-sidebar-active-border-color: #rb-ns-ui.sidebars[@active-border-color];
@page-sidebar-count-vert-padding: #rb-ns-ui.sidebars[@value-padding-vert];
@page-sidebar-count-horiz-padding: #rb-ns-ui.sidebars[@value-padding-horiz];
@page-sidebar-hover-bg: #rb-ns-ui.sidebars[@hover-bg];
@page-sidebar-hover-border-color: #rb-ns-ui.sidebars[@hover-border-color];
@page-sidebar-width: #rb-ns-ui.page-sidebar[@default-width];

/* These are unused. */
@page-sidebar-bg: #E9E9E9;
@page-sidebar-item-vert-padding: 6px;
@page-sidebar-section-vert-padding: 8px;

/**
 * Review request labels in datagrids.
 *
 * Deprecated:
 *     7.0.3:
 *     Use ``var(--rb-p-flag-draft-*)`` variables instead of the
 *     ``summary-label-draft-*`` and ``summary-label-text-color`` definitions.
 */
@summary-label-draft-bg: @draft-color;
@summary-label-draft-border-color: @draft-border-color;
@summary-label-text-color: #005500;
@summary-label-submitted-bg: #FFFFD0;
@summary-label-submitted-border-color: darken(@summary-label-submitted-bg, 55%);
@summary-label-submitted-text-color: #777700;
@summary-label-discarded-bg: #DDDDDD;
@summary-label-discarded-border-color: darken(@summary-label-discarded-bg, 25%);
@summary-label-discarded-text-color: #555555;
@summary-label-archived-bg: #FAFAFA;
@summary-label-archived-border-color: darken(@summary-label-archived-bg, 25%);
@summary-label-archived-text-color: #555555;
@summary-label-muted-bg: #DDDDDD;
@summary-label-muted-border-color: darken(@summary-label-muted-bg, 25%);
@summary-label-muted-text-color: #555555;

// New review request page
@new-review-request-bg: #FFFFFF;
@new-review-request-commit-icon-color: #888;
@new-review-request-commit-info-color: #666;
@new-review-request-jump-to-commit-color: #71A6E2;
@new-review-request-summary-posted-color: #777;

/**
 * Mobile sidebar definitions.
 *
 * Deprecated:
 *     4.0:
 *     These have been replaced by definitions in
 *     ``#rb-ns-ui.page-sidebar.mobile-menu`` or by the page theme.
 */
@mobile-menu-bg-color: transparent;
@mobile-menu-text-color: black;
@mobile-menu-border-color: transparent;
@mobile-menu-header-bg-color: transparent;
@mobile-menu-header-border-color: transparent;
@mobile-menu-footer-height: #rb-ns-ui.page-sidebar.mobile-menu[@footer-height];
@mobile-menu-header-height: #rb-ns-ui.page-sidebar.mobile-menu[@header-height];
@mobile-navbar-width: #rb-ns-ui.page-sidebar.mobile-menu[@width];

@mobile-back-forward-link-color: #444;
@mobile-medium-width-720: 720px;

// Trophy banner
@trophy-banner-bg-color: #fdf2a0;

// Infoboxes
@infobox-padding: 0.75em;
@infobox-bg-color: #F9F9F9;
@infobox-border-color: #666666;
@infobox-border-radius: 3px;
@infobox-inner-border-radius: 2px;
@infobox-header-font-size: 1.4em;
@infobox-hover-item-content-padding-horiz: 6px;
@infobox-hover-item-content-padding-vert: 4px;
@infobox-hover-item-content-offset-top: 20px;
@infobox-item-small-icon-size: 16px;

@user-infobox-avatar-size: 128px;

// Drag-and-drop overlays
@dnd-overlay-background: rgba(0, 0, 0, 0.8);
@dnd-overlay-border: solid 2px grey;
@dnd-overlay-text-color: #dddddd;
@dnd-overlay-font-size: 150%;


// Deprecated as of Review Board 4.0
@dark-blue: #3465A4;
@dark-grey: #5C5C5C;
@dark-yellow: #A89C00;
@grey: #D0D0D0;
@light-blue: #rb-ns-ui.colors[@blue-70];
@light-grey: #EAEAEA;
@light-yellow: #FFF47C;


@import (reference) "mixins/gradients.less";
@import (reference) "mixins/style.less";
