// lms - utilities - variables
// ====================

// #CONFIG:         paths and configuration
// #UNITS:          Basic units of measurement
// #GRID:           Grid and layout variables
// #COLORS:         Base, palette and theme color definitions + application
// #COLORS-EDX-SPECIFIC: edX specific colors not yet refactored to use updated color scheme
// #TYPOGRAPHY:     Font definitions and scales
// #DEPTH:          UI depth-based scale
// #SPACING:        General UI spacing variables and scale
// #FORMS:          form field/interaction variables
// #TIMING:         Event timing variables
// #APPLICATIONS:   Applying configuration
// #DEPRECATED:     sunsetted and not to be used variables

// ----------------------------
// #CONFIG
// ----------------------------
$static-path: '..' !default;


// ----------------------------
// #UNITS
// ----------------------------
$baseline: 20px !default;


// ----------------------------
// #GRID
// ----------------------------
$gw-column: 80px !default;
$gw-gutter: 20px !default;
$fg-column: $gw-column !default;
$fg-gutter: $gw-gutter !default;
$fg-max-columns: 12 !default;
$fg-max-width: 1400px !default;
$fg-min-width: 810px !default;


// ----------------------------
// #COLORS
// ----------------------------
$transparent: rgba(0,0,0,0) !default; // used when color value is needed for UI width/transitions but element is transparent

$black:     rgb(0,0,0) !default;
$black-t0:  rgba($black, 0.125) !default;
$black-t1:  rgba($black, 0.25) !default;
$black-t2:  rgba($black, 0.5) !default;
$black-t3:  rgba($black, 0.75) !default;

$white:     rgb(255,255,255) !default;
$white-t0:  rgba($white, 0.125) !default;
$white-t1:  rgba($white, 0.25) !default;
$white-t2:  rgba($white, 0.5) !default;
$white-t3:  rgba($white, 0.75) !default;

$gray:      rgb(118,118,118) !default;
$gray-l1:   tint($gray,20%) !default;
$gray-l2:   tint($gray,40%) !default;
$gray-l3:   tint($gray,60%) !default;
$gray-l4:   tint($gray,80%) !default;
$gray-l5:   tint($gray,90%) !default;
$gray-l6:   tint($gray,95%) !default;
$gray-l7:   tint($gray,99%) !default;
$gray-d1:   shade($gray,20%) !default;
$gray-d2:   shade($gray,40%) !default;
$gray-d3:   shade($gray,60%) !default;
$gray-d4:   shade($gray,80%) !default;

$yellow: rgb(255, 252, 221) !default;

$pink: rgb(182,37,103) !default;
$pink-l1: tint($pink,20%) !default;
$pink-l2: tint($pink,40%) !default;
$pink-l3: tint($pink,60%) !default;
$pink-l4: tint($pink,80%) !default;
$pink-l5: tint($pink,90%) !default;
$pink-d1: shade($pink,20%) !default;
$pink-d2: shade($pink,40%) !default;
$pink-d3: shade($pink,60%) !default;
$pink-d4: shade($pink,80%) !default;
$pink-s1: saturate($pink,15%) !default;
$pink-s2: saturate($pink,30%) !default;
$pink-s3: saturate($pink,45%) !default;
$pink-u1: desaturate($pink,15%) !default;
$pink-u2: desaturate($pink,30%) !default;
$pink-u3: desaturate($pink,45%) !default;

$red: rgb(178, 6, 16) !default;
$red-l1: tint($red,20%) !default;
$red-l2: tint($red,40%) !default;
$red-l3: tint($red,60%) !default;
$red-l4: tint($red,80%) !default;
$red-l5: tint($red,90%) !default;
$red-d1: shade($red,20%) !default;
$red-d2: shade($red,40%) !default;
$red-d3: shade($red,60%) !default;
$red-d4: shade($red,80%) !default;
$red-s1: saturate($red,15%) !default;
$red-s2: saturate($red,30%) !default;
$red-s3: saturate($red,45%) !default;
$red-u1: desaturate($red,15%) !default;
$red-u2: desaturate($red,30%) !default;
$red-u3: desaturate($red,45%) !default;

$green: rgb(37, 184, 90) !default;
$green-l1: tint($green,20%) !default;
$green-l2: tint($green,40%) !default;
$green-l3: tint($green,60%) !default;
$green-l4: tint($green,80%) !default;
$green-l5: tint($green,90%) !default;
$green-d1: shade($green,20%) !default;
$green-d2: shade($green,40%) !default;
$green-d3: shade($green,60%) !default;
$green-d4: shade($green,80%) !default;
$green-s1: saturate($green,15%) !default;
$green-s2: saturate($green,30%) !default;
$green-s3: saturate($green,45%) !default;
$green-u1: desaturate($green,15%) !default;
$green-u2: desaturate($green,30%) !default;
$green-u3: desaturate($green,45%) !default;

$yellow: rgb(255, 252, 221) !default;      // yellow color used by LMS
//$yellow: rgb(237, 189, 60) !default;     // yellow color used by Studio
$yellow-l1: tint($yellow,20%) !default;
$yellow-l2: tint($yellow,40%) !default;
$yellow-l3: tint($yellow,60%) !default;
$yellow-l4: tint($yellow,80%) !default;
$yellow-l5: tint($yellow,90%) !default;
$yellow-d1: shade($yellow,20%) !default;
$yellow-d2: shade($yellow,40%) !default;
$yellow-d3: shade($yellow,60%) !default;
$yellow-d4: shade($yellow,80%) !default;
$yellow-s1: saturate($yellow,15%) !default;
$yellow-s2: saturate($yellow,30%) !default;
$yellow-s3: saturate($yellow,45%) !default;
$yellow-u1: desaturate($yellow,15%) !default;
$yellow-u2: desaturate($yellow,30%) !default;
$yellow-u3: desaturate($yellow,45%) !default;

$blue: rgb(0, 121, 188) !default;
$blue-l1: tint($blue,20%) !default;
$blue-l2: tint($blue,40%) !default;
$blue-l3: tint($blue,60%) !default;
$blue-l4: tint($blue,80%) !default;
$blue-l5: tint($blue,90%) !default;
$blue-d1: shade($blue,20%) !default;
$blue-d2: shade($blue,40%) !default;
$blue-d3: shade($blue,60%) !default;
$blue-d4: shade($blue,80%) !default;
$blue-s1: saturate($blue,15%) !default;
$blue-s2: saturate($blue,30%) !default;
$blue-s3: saturate($blue,45%) !default;
$blue-u1: desaturate($blue,15%) !default;
$blue-u2: desaturate($blue,30%) !default;
$blue-u3: desaturate($blue,45%) !default;
$blue-t0: rgba($blue, 0.125) !default;
$blue-t1: rgba($blue, 0.25) !default;
$blue-t2: rgba($blue, 0.50) !default;
$blue-t3: rgba($blue, 0.75) !default;

$uxpl-blue-base: rgb(0, 117, 180) !default; // wcag2a compliant
$uxpl-blue-hover-active: rgb(6, 86, 131) !default; // wcag2a compliant

$uxpl-green-base: rgb(0, 129, 0) !default; // wcag2a compliant
$uxpl-green-hover-active: rgb(0, 155, 0) !default; // wcag2a compliant

$uxpl-pink-base: rgb(194, 56, 125) !default; // wcag2a compliant
$uxpl-pink-hover-active: lighten($uxpl-pink-base, 7%) !default; // wcag2a compliant

$uxpl-grayscale-x-back: rgb(245, 245, 245) !default; // UXPL grayscale, x-back

$orange: rgb(237, 189, 60) !default;
$orange-l1: tint($orange,20%) !default;
$orange-l2: tint($orange,40%) !default;
$orange-l3: tint($orange,60%) !default;
$orange-l4: tint($orange,80%) !default;
$orange-l5: tint($orange,90%) !default;
$orange-d1: shade($orange,20%) !default;
$orange-d2: shade($orange,40%) !default;
$orange-d3: shade($orange,60%) !default;
$orange-d4: shade($orange,80%) !default;
$orange-s1: saturate($orange,15%) !default;
$orange-s2: saturate($orange,30%) !default;
$orange-s3: saturate($orange,45%) !default;
$orange-u1: desaturate($orange,15%) !default;
$orange-u2: desaturate($orange,30%) !default;
$orange-u3: desaturate($orange,45%) !default;

// ====================

// copied from cms/static/sass/_variables.scss
$ui-notification-height: ($baseline*10);


// ====================

// social platforms
$twitter-blue: #55ACEE;
$facebook-blue: #3B5998;
$linkedin-blue: #0077B5;
$google-red: #D73924;
$microsoft-blue: #00BCF2;

// shadows
$shadow: rgba(0,0,0,0.2) !default;
$shadow-l1: rgba(0,0,0,0.1) !default;
$shadow-l2: rgba(0,0,0,0.05) !default;
$shadow-d1: rgba(0,0,0,0.4) !default;
$shadow-d2: rgba($black, 0.6) !default;

// system feedback-based colors
$error-color: rgb(203, 7, 18) !default;
$warning-color: rgb(255, 192, 31) !default;
$confirm-color: rgb(0, 132, 1) !default;
$active-color: $blue !default;
$highlight-color: rgb(255,255,0) !default;
$alert-color: rgb(212, 64, 64) !default;
$success-color: rgb(0, 155, 0) !default;


// ----------------------------
// #COLORS- EDX-SPECIFIC
// ----------------------------

// logo colors
$micromasters-color: #005585;
$xseries-color: #424242;
$professional-certificate-color: #9a1f60;
$zebra-stripe-color: rgb(249, 250, 252);
$divider-color: rgb(226,231,236);

// old color variables
// DEPRECATED: Do not continue to use these colors, instead use pattern libary and base colors above.
$dark-gray1: rgb(74,74,74) !default;
$light-gray1: rgb(242,242,242) !default;
$light-gray2: rgb(171,171,171) !default;
$light-gray3: rgb(249,249,249) !default;
$light-gray4: rgb(252,252,252) !default;
$dark-gray2: rgb(151,151,151) !default;
$blue1: rgb(74,144,226) !default;
$blue2: rgb(0,161,229) !default;
$green1: rgb(97,161,46) !default;
$red1: rgb(208,2,27) !default;

// edx-specific: marketing site variables
// DEPRECATED: Do not continue to use these colors, instead use pattern libary and base colors above.
$m-gray: rgb(138,140,143) !default; //C8F
$m-gray-l1: rgb(151,153,155) !default;
$m-gray-l2: rgb(164,166,168) !default;
$m-gray-l3: rgb(177,178,180) !default;
$m-gray-l4: rgb(245,245,245) !default;
$m-gray-d1: rgb(111, 112, 116) !default;
$m-gray-d2: rgb(112,114,118) !default;
$m-gray-d3: rgb(100,102,104) !default;
$m-gray-d4: rgb(5,5,5) !default;
$m-gray-t0: rgba($m-gray,0.125) !default;
$m-gray-t1: rgba($m-gray,0.25) !default;
$m-gray-t2: rgba($m-gray,0.50) !default;
$m-gray-t3: rgba($m-gray,0.75) !default;

$m-blue: $uxpl-blue-base;  // uxpl blue base
$m-blue-l1: rgb(43,172,230) !default;
$m-blue-l2: rgb(66,181,233) !default;
$m-blue-l3: rgb(89,190,236) !default;
$m-blue-l4: tint($m-blue,90%) !default;
$m-blue-l5: tint($m-blue,95%) !default;
$m-blue-l6: #4bb4fb !default;
$m-blue-d1: rgb(23,144,199) !default;
$m-blue-d2: $blue !default;
$m-blue-d3: rgb(18,111,154) !default;
$m-blue-d4: rgb(10,74,103) !default;
$m-blue-d5: rgb(0,158,231) !default;
$m-blue-d6: #256A97 !default;
$m-blue-t0: rgba($m-blue,0.125) !default;
$m-blue-t1: rgba($m-blue,0.25) !default;
$m-blue-t2: rgba($m-blue,0.50) !default;
$m-blue-t3: rgba($m-blue,0.75) !default;

$m-pink: $uxpl-pink-base; // uxpl pink base
$m-pink-l1: rgb(202,47,115) !default;
$m-pink-l2: rgb(211,63,128) !default;
$m-pink-l3: rgb(215,84,142) !default;
$m-pink-l4: tint($m-pink,75%) !default;
$m-pink-l5: tint($m-pink,85%) !default;
$m-pink-d1: rgb(160,37,91) !default;
$m-pink-d2: rgb(140,32,79) !default;
$m-pink-d3: rgb(119,28,68) !default;

$m-green: $uxpl-green-base; // uxpl green base
$m-green-s1: rgb(96, 188, 97) !default;
$m-green-l1: tint($m-green,20%) !default;
$m-green-l2: tint($m-green,40%) !default;
$m-green-l3: tint($m-green,60%) !default;
$m-green-l4: tint($m-green,90%) !default;
$m-green-l5: tint($m-green,95%) !default;
$m-green-d1: shade($m-green,20%) !default;
$m-green-d2: shade($m-green,40%) !default;
$m-green-d3: shade($m-green,60%) !default;
$m-green-d4: shade($m-green,90%) !default;
$m-green-t0: rgba($m-green,0.125) !default;
$m-green-t1: rgba($m-green,0.25) !default;
$m-green-t2: rgba($m-green,0.50) !default;
$m-green-t3: rgba($m-green,0.75) !default;

// edx-specific: verified
$verified-color-lvl1: $m-green !default;
$verified-color-lvl2: $m-green-l1 !default;
$verified-color-lvl3: $m-green-l2 !default;
$verified-color-lvl4: $m-green-l3 !default;
$verified-color-lvl5: $m-green-l4 !default;

// edx-specific: professional ed
$professional-color-lvl1: $m-pink !default;
$professional-color-lvl2: $m-pink-l1 !default;
$professional-color-lvl3: $m-pink-l2 !default;
$professional-color-lvl4: $m-pink-l3 !default;
$professional-color-lvl5: $m-pink-l4 !default;

// edx-specific: honor code
$honorcode-color-lvl1: $m-blue !default;
$honorcode-color-lvl2: tint($honorcode-color-lvl1, 33%) !default;

// edx-specific: audit
$audit-color-lvl1: rgb(221, 221, 221) !default;
$audit-color-lvl2: tint($audit-color-lvl1, 33%) !default;

// edx-specific: credit
$credit-color-base: rgb(244,195,0) !default; // accessible with black text

// edx-specific: Studio/Staff actions
$staff-color: $uxpl-pink-base !default;



// ----------------------------
// #TYPOGRAPHY
// ----------------------------
$sans-serif: 'Open Sans', $verdana, sans-serif !default;
$monospace: Monaco, 'Bitstream Vera Sans Mono', 'Lucida Console', monospace !default;
$body-font-family: $sans-serif !default;
$serif: $georgia !default;

// newer variables/standards
$f-serif: 'Bree Serif', Georgia, Cambria, 'Times New Roman', Times, serif !default;
$f-sans-serif: 'Open Sans','Helvetica Neue', Helvetica, Arial, sans-serif !default;
$f-monospace: 'Bitstream Vera Sans Mono', Consolas, Courier, monospace !default;

$font-light: 300 !default;
$font-regular: 400 !default;
$font-semibold: 600 !default;
$font-bold: 700 !default;

$m-base-font-size: em(15) !default;


// ----------------------------
// #DEPTH
// ----------------------------


// ----------------------------
// #TIMING
// ----------------------------
$tmg-s3: 3.0s !default;
$tmg-s2: 2.0s !default;
$tmg-s1: 1.0s !default;
$tmg-avg: 0.75s !default;
$tmg-f1: 0.50s !default;
$tmg-f2: 0.25s !default;
$tmg-f3: 0.125s !default;


// ----------------------------
// #FORMS
// ----------------------------
$form-bg-color: $white !default;

// ----------------------------
// #APPLICATIONS
// ----------------------------
// font sizes
$body-font-size: em(14) !default;
$body-line-height: golden-ratio(.875em, 1) !default;

$base-font-color: rgb(60,60,60) !default;
$baseFontColor: $base-font-color;

$lighter-base-font-color: rgb(100,100,100) !default;
$very-light-text: rgb(255,255,255) !default;
$text-color: rgb(51, 51, 51) !default;

// borders
$border-color-1: rgb(190,190,190) !default;
$border-color-2: rgb(200,200,200) !default;
$border-color-3: rgb(100,100,100) !default;
$border-color-4: rgb(252,252,252) !default;
$border-color-l1: $m-gray-l1 !default;
$border-color-l2: $m-gray-l2 !default;
$border-color-l3: $m-gray-l3 !default;
$border-color-l4: $m-gray-l4 !default;

// visual horizontal rules
$faded-hr-image-1: linear-gradient(180deg, rgba(200,200,200, 0) 0%, rgba(200,200,200, 1) 50%, rgba(200,200,200, 0)) !default;
$faded-hr-image-2: linear-gradient(180deg, rgba(200,200,200, 0) 0%, rgba(200,200,200, 1)) !default;
$faded-hr-image-3: linear-gradient(180deg, rgba(200,200,200, 1) 0%, rgba(200,200,200, 0)) !default;
$faded-hr-image-4: linear-gradient(180deg, rgba(240,240,240, 0) 0%, rgba(240,240,240, 1) 50%, rgba(240,240,240, 0)) !default;
$faded-hr-image-5: linear-gradient(180deg, rgba(255,255,255, 0) 0%, rgba(255,255,255, 0.8) 50%, rgba(255,255,255, 0)) !default;
$faded-hr-image-6: linear-gradient(90deg, rgba(255,255,255, 0) 0%, rgba(255,255,255, 0.6) 50%, rgba(255,255,255, 0)) !default;

// notifications
$notify-banner-bg-1: rgb(56,56,56) !default;
$notify-banner-bg-2: rgb(136,136,136) !default;
$notify-banner-bg-3: $shadow-l2 !default;
$msg-bg: $m-blue-d3 !default;

// actions
$button-bg-image: linear-gradient(rgb(255,255,255) 0%, rgb(250,250,250) 50%, rgb(237,237,237) 50%, rgb(220,220,220) 100%) !default;
$button-bg-color: transparent !default;
$button-bg-hover-color: $white !default;

// action - primary
$action-primary-bg: $m-blue-d3 !default;
$action-primary-fg: $white !default;
$action-primary-shadow: $m-blue-d4 !default;
$action-primary-focused-bg: $m-blue-d1 !default;
$action-primary-focused-fg: $white !default;
$action-primary-active-bg: $m-blue !default;
$action-primary-active-fg: $m-blue-d3 !default;
$action-primary-active-shadow: $m-blue-d2 !default;
$action-primary-active-focused-fg: $m-blue-d4 !default;
$action-primary-active-focused-shadow: $m-blue-d3 !default;
$action-primary-disabled-bg: $m-gray-d3 !default;
$action-prmary-disabled-fg: $white !default;

// action - secondary
$action-secondary-bg: $m-pink !default;
$action-secondary-fg: $white !default;
$action-secondary-shadow: $m-pink-d2 !default;
$action-secondary-focused-bg: $m-pink-l3 !default;
$action-secondary-focused-fg: $white !default;
$action-secondary-active-bg: $m-pink-l2 !default;
$action-secondary-active-fg: $m-pink-d1 !default;
$action-secondary-active-shadow: $m-pink-d1 !default;
$action-secondary-active-focused-fg: $m-pink-d3 !default;
$action-secondary-active-focused-shadow: $m-pink-d2 !default;
$action-secondary-disabled-bg: $m-gray-d3 !default;
$action-secondary-disabled-fg: $white !default;

// actions - misc
$link-color: $uxpl-blue-base !default;
$link-color-d1: $link-color !default;
$link-hover: $uxpl-blue-hover-active !default; // from our Pattern Library http://ux.edx.org/elements/colors/
$site-status-color: $pink !default;
$button-color: $uxpl-blue-base !default;
$button-archive-color: rgb(238,238,238) !default; // #eeeeee

// larger, random elements
$dark-trans-bg: rgba(0, 0, 0, .75) !default;

$body-bg: $uxpl-grayscale-x-back !default;

$container-bg: $white !default;

// header
$header-image: linear-gradient(-90deg, rgba(255,255,255, 1), rgba(230,230,230, 0.9)) !default;
$header-bg: $white !default;
$header-border-color: $blue !default;
$header-graphic-super-color: $m-blue-d1 !default;
$header-graphic-sub-color: $m-gray-d2 !default;
$header-sans-serif: 'Open Sans', Arial, Helvetica, sans-serif !default;
$header_image_margin: -69px !default;

// footer
$footer-bg: $white !default;
$footer_margin: ($baseline/4) 0 ($baseline*1.5) 0 !default;

// modal
$shadow-color: $blue !default;
$modal-bg-color: rgb(245,245,245) !default;

// courseware elements
$courseware-header-image: linear-gradient(top, rgb(255,255,255), rgb(238,238,238)) !default;
$courseware-header-bg: transparent !default;
$courseware-footer-border: none !default;
$courseware-footer-shadow: none !default;
$courseware-footer-margin: 0px !default;
$courseware-border-bottom-color: rgb(68,162,222) !default;
$courseware-button-border-color: rgb(230,230,230) !default;
$courseware-hover-color: rgb(51,52,53) !default;
$courseware-navigation-color: $uxpl-blue-base !default;

// homepage, onboarding, and course discovery
$homepage__header--gradient__color--alpha: lighten($gray, 15%) !default;
$homepage__header--gradient__color--bravo: saturate($gray, 30%) !default;
$homepage__header--background: lighten($gray, 15%) !default;
$homepage-background: rgb(252, 252, 252) !default;
$course-card-height: ($baseline*18) !default;
$course-image-height: ($baseline*8) !default;
$course-info-height: ($baseline*10) !default;
$course-title-height: ($baseline*3.6) !default;
$homepage-bg-image: none !default;
$login-banner-image: url('#{$static-path}/images/edx-theme/edx-background-banner-account.png') !default;
$register-banner-image: url('#{$static-path}/images/edx-theme/edx-background-banner-account.png') !default;
$passwordreset-banner-image: url('#{$static-path}/images/edx-theme/edx-background-banner-account.png') !default;

$video-thumb-url: '#{$static-path}/images/homepage-hero-video-thumb.jpg' !default;

// dashboard elements
$dashboard-profile-header-image: linear-gradient(-90deg, rgb(255,255,255), rgb(245,245,245)) !default;
$dashboard-profile-header-color: transparent !default;
$dashboard-profile-color: rgb(252,252,252) !default;
$dot-color: rgb(221, 221, 221) !default;
$dashboard-course-cover-border: rgb(221, 221, 221) !default;

// dashboard notification messages
$palette-info-border: #cce3f0;
$palette-info-back: #f2f8fb;
$palette-info-text: #0075b4;
$palette-error-border: #ebccd1;
$palette-error-back: #feeced;
$palette-error-text: #b20610;
$palette-success-border: #b9edb9;
$palette-success-back: #ecfaec;
$palette-success-text: #008100;

// course elements
$content-wrapper-bg: $white !default;
$course-bg-color: $uxpl-grayscale-x-back !default;
$account-content-wrapper-bg: shade($body-bg, 2%) !default;
$course-profile-bg: rgb(245,245,245) !default;
$course-header-bg: rgba(255,255,255, 0.93) !default;

// search/listing results
$result-highlight-color-base: rgba($highlight-color, 0.25) !default;

// sidebar
$sidebar-chapter-bg-top: rgba(255, 255, 255, .5) !default;
$sidebar-chapter-bg-bottom: rgba(255, 255, 255, 0) !default;
$sidebar-chapter-bg: rgb(246,246,246) !default;
$sidebar-active-image: linear-gradient(top, rgb(230,230,230), rgb(214,214,214)) !default;


// student notes
$student-notes-highlight-color-base: saturate($yellow, 65%) !default;
$student-notes-highlight-color: tint($student-notes-highlight-color-base, 50%) !default;
$student-notes-highlight-color-focus: $student-notes-highlight-color-base !default;

// ----------------------------
// #DEPRECATED
// ----------------------------
$danger-red: rgb(212, 64, 64) !default;
$light-gray: rgb(221, 221, 221) !default;
$dark-gray: rgb(51, 51, 51) !default;
$border-color: rgb(200, 200, 200) !default;
$sidebar-color: rgb(246, 246, 246) !default;
$outer-border-color: $gray-l3 !default;

// used by descriptor css
$lightGrey: rgb(237,241,245) !default;
$mediumGrey: #ced2db !default;
$darkGrey: rgb(136,145,161) !default;
$extraDarkGrey: #3d4043 !default;
$lightGrey1: $gray-l3 !default;
$paleYellow: #fffcf1 !default;
