
//
// Mixins
// --------------------------------------------------


// Utilities
// -------------------------

// Clearfix
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
//    contenteditable attribute is included anywhere else in the document.
//    Otherwise it causes space to appear at the top and bottom of elements
//    that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
//    `:before` to contain the top-margins of child elements.
@mixin clearfix() {
  &:before,
  &:after {
    content: " "; 
    display: table; 
  }
  &:after {
    clear: both;
  }
}

// Webkit-style focus
@mixin tab-focus() {
  // Default
  outline: thin dotted #333;
  // Webkit
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

// Center-align a block level element
@mixin center-block() {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

// Sizing shortcuts
@mixin size($width, $height) {
  width: $width;
  height: $height;
}
@mixin square($size) {
  @include size($size, $size);
}

// Placeholder text
@mixin placeholder($color: $input-color-placeholder) {
  &:-moz-placeholder            { color: $color; } // Firefox 4-18
  &::-moz-placeholder           { color: $color; } // Firefox 19+
  &:-ms-input-placeholder       { color: $color; } // Internet Explorer 10+
  &::-webkit-input-placeholder  { color: $color; } // Safari and Chrome
}

// Text overflow
// Requires inline-block or block for proper styling
@mixin text-overflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// CSS image replacement
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
@mixin hide-text() {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}



// CSS3 PROPERTIES
// --------------------------------------------------

// Single side border-radius
@mixin border-top-radius($radius) {
  border-top-right-radius: $radius;
   border-top-left-radius: $radius;
}
@mixin border-right-radius($radius) {
  border-bottom-right-radius: $radius;
     border-top-right-radius: $radius;
}
@mixin border-bottom-radius($radius) {
  border-bottom-right-radius: $radius;
   border-bottom-left-radius: $radius;
}
@mixin border-left-radius($radius) {
  border-bottom-left-radius: $radius;
     border-top-left-radius: $radius;
}

// Drop shadows
@mixin box-shadow($shadow...) {
  box-shadow: $shadow;
}

// Transitions
@mixin transition($transition...) {
  transition: $transition;
}
@mixin transition-delay($transition-delay) {
  transition-delay: $transition-delay;
}
@mixin transition-duration($transition-duration) {
  transition-duration: $transition-duration;
}
@mixin transition-transform($transition...) {
  transition: transform $transition;
}

// Transformations
@mixin rotate($degrees) {
  transform: rotate($degrees);
}
@mixin scale($ratio) {
  transform: scale($ratio);
}
@mixin translate($x, $y) {
  transform: translate($x, $y);
}
@mixin skew($x, $y) {
  transform: skew($x, $y);
}
@mixin translate3d($x, $y, $z) {
  transform: translate3d($x, $y, $z);
}

// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
@mixin backface-visibility($visibility){
  backface-visibility: $visibility;
}

// Box sizing
@mixin box-sizing($boxmodel) {
  box-sizing: $boxmodel;
}

// User select
// For selecting text on the page
@mixin user-select($select) {
  user-select: $select;
}

// Resize anything
@mixin resizable($direction) {
  resize: $direction; // Options: horizontal, vertical, both
  overflow: auto; // Safari fix
}

// CSS3 Content Columns
@mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
  column-count: $column-count;
  column-gap: $column-gap;
}

// Optional hyphenation
@mixin hyphens($mode: auto) {
  word-wrap: break-word;
  hyphens: $mode;
}

// Opacity
@mixin opacity($opacity) {
  opacity: $opacity;
}



// GRADIENTS
// --------------------------------------------------



// Horizontal gradient, from left to right
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
  background-image:  linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
  background-repeat: repeat-x;
}

// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10
  background-repeat: repeat-x;
}

@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
  background-repeat: repeat-x;
  background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10
}
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
  background-repeat: no-repeat;
}
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
  background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
  background-repeat: no-repeat;
}
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
  background-image: radial-gradient(circle, $inner-color, $outer-color);
  background-repeat: no-repeat;
}
@mixin gradient-striped($color: #555, $angle: 45deg) {
  background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
}

// Reset filters for IE
//
// When you need to remove a gradient background, do not forget to use this to reset
// the IE filter for IE9 and below.
@mixin reset-filter() {
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}



// Retina images
//
// Short retina mixin for setting background-image and -size

@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
  background-image: url(#{$file-1x});

  @media
  only screen and (        min-device-pixel-ratio: 2),
  only screen and (                min-resolution: 192dpi),
  only screen and (                min-resolution: 2dppx) {
    background-image: url(#{$file-2x});
    background-size: $width-1x $height-1x;
  }
}


// Responsive image
//
// Keep images from scaling beyond the width of their parents.

@mixin img-responsive($display: block) {
  display: $display;
  max-width: 100%; // Part 1: Set a maximum relative to the parent
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}


// COMPONENT MIXINS
// --------------------------------------------------

// Horizontal dividers
// -------------------------
// Dividers (basically an hr) within dropdowns and nav lists
@mixin nav-divider($color: #e5e5e5) {
  height: 1px;
  margin: (($line-height-computed / 2) - 1) 0;
  overflow: hidden;
  background-color: $color;
}

// Panels
// -------------------------
@mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
  border-color: $border;
  & > .panel-heading {
    color: $heading-text-color;
    background-color: $heading-bg-color;
    border-color: $heading-border;
    + .panel-collapse .panel-body {
      border-top-color: $border;
    }
  }
  & > .panel-footer {
    + .panel-collapse .panel-body {
      border-bottom-color: $border;
    }
  }
}

// Alerts
// -------------------------
@mixin alert-variant($background, $border, $text-color) {
  background-color: $background;
  border-color: $border;
  color: $text-color;
  hr {
    border-top-color: darken($border, 5%);
  }
  .alert-link {
    color: darken($text-color, 10%);
  }
}

// Tables
// -------------------------
@mixin table-row-variant($state, $background, $border) {
  // Exact selectors below required to override `.table-striped` and prevent
  // inheritance to nested tables.
  .table > thead > tr,
  .table > tbody > tr,
  .table > tfoot > tr {
    > td.#{$state},
    > th.#{$state},
    &.#{$state} > td,
    &.#{$state} > th {
      background-color: $background;
      border-color: $border;
    }
  }

  // Hover states for `.table-hover`
  // Note: this is not available for cells or rows within `thead` or `tfoot`.
  .table-hover > tbody > tr {
    > td.#{$state}:hover,
    > th.#{$state}:hover,
    &.#{$state}:hover > td {
      background-color: darken($background, 5%);
      border-color: darken($border, 5%);
    }
  }
}

// Button variants
// -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
@mixin button-variant($color, $background, $border) {
  color: $color;
  background-color: $background;
  border-color: $border;

  &:hover,
  &:focus,
  &:active,
  &.active {
    color: $color;
    background-color: darken($background, 8%);
        border-color: darken($border, 12%);
  }
  .open & { &.dropdown-toggle {
    color: $color;
    background-color: darken($background, 8%);
        border-color: darken($border, 12%);
  } }
  &:active,
  &.active {
    background-image: none;
  }
  .open & { &.dropdown-toggle {
    background-image: none;
  } }
  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &:active,
    &.active {
      background-color: $background;
          border-color: $border
    }
  }
}

// Button sizes
// -------------------------
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  padding: $padding-vertical $padding-horizontal;
  font-size: $font-size;
  line-height: $line-height;
  border-radius: $border-radius;
}

// Pagination
// -------------------------
@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
  > li {
    > a,
    > span {
      padding: $padding-vertical $padding-horizontal;
      font-size: $font-size;
    }
    &:first-child {
      > a,
      > span {
        @include border-left-radius($border-radius);
      }
    }
    &:last-child {
      > a,
      > span {
        @include border-right-radius($border-radius);
      }
    }
  }
}

// Labels
// -------------------------
@mixin label-variant($color) {
  background-color: $color;
  &[href] {
    &:hover,
    &:focus {
      background-color: darken($color, 10%);
    }
  }
}

// Navbar vertical align
// -------------------------
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
@mixin navbar-vertical-align($element-height) {
  margin-top: (($navbar-height - $element-height) / 2);
  margin-bottom: (($navbar-height - $element-height) / 2);
}

// Progress bars
// -------------------------
@mixin progress-bar-variant($color) {
  background-color: $color;
  .progress-striped & {
    @include gradient-striped($color);
  }
}

// Responsive utilities
// -------------------------
// More easily include all the states for responsive-utilities.less.
// $parent hack because sass doesn't support tr& (without space)
@mixin responsive-visibility($parent) {
  #{$parent} { display: block !important; }
  tr#{$parent} { display: table-row !important; }
  th#{$parent},
  td#{$parent} { display: table-cell !important; }
}

@mixin responsive-invisibility($parent) {
  #{$parent} { display: none !important; }
  tr#{$parent} { display: none !important; }
  th#{$parent},
  td#{$parent} { display: none !important; }
}

// Grid System
// -----------

// Centered container element
@mixin container-fixed() {
  margin-right: auto;
  margin-left: auto;
  padding-left:  ($grid-gutter-width / 2);
  padding-right: ($grid-gutter-width / 2);
  @include clearfix();
}

// Creates a wrapper for a series of columns
@mixin make-row($gutter: $grid-gutter-width) {
  margin-left:  ($gutter / -2);
  margin-right: ($gutter / -2);
  @include clearfix();
}

// Generate the extra small columns
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  float: left;
  width: percentage(($columns / $grid-columns));
  // Prevent columns from collapsing when empty
  min-height: 1px;
  // Inner gutter via padding
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);
}

// Generate the small columns
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  // Prevent columns from collapsing when empty
  min-height: 1px;
  // Inner gutter via padding
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  // Calculate width based on number of columns available
  @media (min-width: $screen-sm) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}

// Generate the small column offsets
@mixin make-sm-column-offset($columns) {
  @media (min-width: $screen-sm) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-sm-column-push($columns) {
  @media (min-width: $screen-sm) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-sm-column-pull($columns) {
  @media (min-width: $screen-sm) {
    right: percentage(($columns / $grid-columns));
  }
}

// Generate the medium columns
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  // Prevent columns from collapsing when empty
  min-height: 1px;
  // Inner gutter via padding
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  // Calculate width based on number of columns available
  @media (min-width: $screen-md) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}

// Generate the large column offsets
@mixin make-md-column-offset($columns) {
  @media (min-width: $screen-md) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-md-column-push($columns) {
  @media (min-width: $screen-md) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-md-column-pull($columns) {
  @media (min-width: $screen-md) {
    right: percentage(($columns / $grid-columns));
  }
}

// Generate the large columns
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  // Prevent columns from collapsing when empty
  min-height: 1px;
  // Inner gutter via padding
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  // Calculate width based on number of columns available
  @media (min-width: $screen-lg) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}

// Generate the large column offsets
@mixin make-lg-column-offset($columns) {
  @media (min-width: $screen-lg) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-lg-column-push($columns) {
  @media (min-width: $screen-lg) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-lg-column-pull($columns) {
  @media (min-width: $screen-lg) {
    right: percentage(($columns / $grid-columns));
  }
}


// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.

@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
  // Color the label and help text
  .help-block,
  .control-label {
    color: $text-color;
  }
  // Set the border and box shadow on specific inputs to match
  .form-control {
    border-color: $border-color;
    box-shadow:inset 0 1px 1px rgba(0,0,0,.075); // Redeclare so transitions work
    &:focus {
      border-color: darken($border-color, 10%);
      $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
      box-shadow: $shadow;
    }
  }
  // Set validation states also for addons
  .input-group-addon {
    color: $text-color;
    border-color: $border-color;
    background-color: $background-color;
  }
}

// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `$input-focus-border` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.

@mixin form-control-focus($color: $input-border-focus) {
  $color-rgba: rgba(red($color), green($color), blue($color), .6);
  &:focus {
    border-color: $color;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba;
  }
}

// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!

@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  #{$parent} { height: $input-height;
  padding: $padding-vertical $padding-horizontal;
  font-size: $font-size;
  line-height: $line-height;
  border-radius: $border-radius; }
  select#{$parent} {
    height: $input-height;
    line-height: $input-height;
  }

  textarea#{$parent} {
    height: auto;
  }
}

// Extra small screen / phone
$screen-xs:                  480px !default;
$screen-phone:               $screen-xs !default;

// Small screen / tablet
$screen-sm:                  768px !default;
$screen-tablet:              $screen-sm !default;

// Medium screen / desktop
$screen-md:                  952px !default;
$screen-desktop:             $screen-md !default;

// Large screen / wide desktop
$screen-lg:                  1200px !default;
$screen-lg-desktop:          $screen-lg !default;

// So media queries don't overlap when required, provide a maximum
$screen-xs-max:              ($screen-sm - 1) !default;
$screen-sm-max:              ($screen-md - 1) !default;
$screen-md-max:              ($screen-lg - 1) !default;


$within_lg: '(max-width: ' + $screen-md-max + ')';
$within_md: '(max-width: ' + $screen-sm-max + ')';
$within_sm: '(max-width: ' + $screen-xs-max + ')';
$within_xs: '(max-width: ' + $screen-xs + ')';
$above_lg: '(min-width: ' + $screen-lg + ')';
$above_md: '(min-width: ' + $screen-md + ')';
$above_sm: '(min-width: ' + $screen-sm + ')';
$above_xs: '(min-width: ' + $screen-xs + ')';

$gutter: 20px;
$default_font_size: 12px;

.crow {
  @include make-row($gutter);
  font-size: 0;
}

%col {
  display: inline-block;
  min-height: 1px;
  vertical-align: top;
  font-size: $default_font_size;
  padding-left: $gutter / 2;
  padding-right: $gutter / 2;
   box-sizing: border-box;
}

@mixin columns($size, $columns: 12) {
  @if ($size != '') {
    $size: $size + '-';
  }
  @for $n from 1 through $columns {
    .col-#{$size}#{$n} {
      @extend %col !optional;
      width: percentage($n/$columns);
    }
  }
  .col-#{$columns} {
    float: none;
  }
}


@media #{$within_sm} {
  @include columns('xs');
}

@media #{$above_sm} {
  @include columns('sm');
}
@media #{$above_md} {
  @include columns('md');
}
@media #{$above_lg} {
  @include columns('lg');
}

@mixin flexbox() {
  overflow: hidden;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

@mixin flexflow($val) {
  -webkit-flex-flow: $val;
  -ms-flex-flow: $val;
  flex-flow: $val;
}

@mixin flex($val) {
  display: inline-block;
  -webkit-box-flex: $val;
  -moz-box-flex: $val;
  -ms-flex: $val;
  -webkit-flex: $val;
  flex: $val;
}

@mixin ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@mixin clearfix {
  clear: both;
  content: "";
}

@mixin clearfix_ab {
  &:after, &:before {
    content: "\0020";
    display: block;
    clear: both;
  }
}

@mixin keyframes($name) {
  @keyframes #{$name} {
    @content;
  }
}

//
// Utility classes
// --------------------------------------------------


// Floats
// -------------------------

.clearfix {
  @include clearfix();
}
.pull-right {
  float: right !important;
}
.pull-left {
  float: left !important;
}


// Toggling content
// -------------------------

.hide {
  display: none !important;
}
.show {
  display: block !important;
}
.invisible {
  visibility: hidden;
}
.text-hide {
  @include hide-text();
}


// For Affix plugin
// -------------------------

.affix {
  position: fixed;
}

@mixin rs-visible($parent) {
  #{$parent} { display: block !important; }
  tr#{$parent} { display: table-row !important; }
  th#{$parent},
  td#{$parent} { display: table-cell !important; }
}

@mixin rs-hidden($parent) {
  #{$parent} { display: none !important; }
  tr#{$parent} { display: none !important; }
  th#{$parent},
  td#{$parent} { display: none !important; }
}

.visible-lg, .visible-md, .visible-sm, .visible-xs {
  display: none;
}

@media #{$above_lg} {
  @include rs-visible('.visible-lg');
  @include rs-hidden('.hidden-lg');
}
@media #{$above_sm} and #{$within_md} {
  @include rs-visible('.visible-md');
  @include rs-hidden('.hidden-md');
}
@media #{$above_xs} and #{$within_sm} {
  @include rs-visible('.visible-sm');
  @include rs-hidden('.hidden-sm');
}
@media #{$within_xs} {
  @include rs-visible('.visible-xs');
  @include rs-hidden('.hidden-xs');
}

// < md
@media (max-width: 768px) {
  .hidden-sm {
    display: none !important;
  }
}


@include responsive-invisibility('.visible-print');
@media print {
  @include responsive-visibility('.visible-print');
  @include responsive-invisibility('.hidden-print');
}

#db-global-nav {
  position: relative;
  z-index: 1000;
}
@media #{$within_md} {
  .gallery-hd{
    margin-top: 30px;
    .join-group{
      display: none;
    }
    .topic-abstract{
      &:after{
        content: none;
      }
    }
  }
  #db-global-nav {
    min-width: 0;
  }
  #db-nav-sns {
    min-width: 0 ;
    .nav-primary, .nav-secondary {
      padding-left: 10px;
      padding-right: 10px;
      width: auto !important;
    }
  }
  .topic-note{
    margin: 0 -10px;
    .panel{
      top: 0;
      left: 0;
    }
  }
}

@media (max-width: 900px) {
    .more-items{
        width: 90px;
    }
    .gallery-more{
        width: 100%;
    }
  #db-nav-sns .nav-items {
    float: none;
    clear: left;
    border-top: 1px solid #e9e6e3;
    padding: 10px 0 5px;
    margin: 0;
    font-size: 16px;
  }
}

.promo_top_banner{
  position: relative;
  .banner_bg{
    position: relative;
    font-size: 0;
    padding-bottom: 21.33333%;
    img{
      width: 100%;
      position: absolute;
      top: 0;
      left: 0;
    }
  }
  .banner_wrapper{
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    right: 10px;
    .banner_inner{
      display: table;
      width: 100%;
      height: 100%;
    }
    .promo_title{
      display: table-cell;
      vertical-align: middle;
    }
    .button_wrapper{
        display: table-cell;
        vertical-align: middle;
        text-align: right;
    }
    .promo_title_text{
      font-size: 14px;
      font-weight: normal;
      line-height: 22px;
      color: #2CA532;
    }
    .promo_button{
      font-size: 13px;
      font-weight: bold;
      width: auto;
      padding: 0 14px;
      position: relative;
      display: inline-block;
      border-radius: 3px;
      line-height: 2;
    }
    .download_app{
      color: #fff;
      border: 1px solid #42bd56;
      background: #42bd56;
    }
    .open_app{
      margin-right: 0;
      margin-left: 8px;
      color: #42bd56;
      border: 1px solid #42bd56;
    }
  }
}

// global
@media #{$within_sm} {
  body {
    .dui-dialog {
      position: absolute;
    }
  }
  .promo_top_banner{
    margin: 0 -10px;
  }
  h1 {
    font-size: 20px;
  }
  #db-global-nav {
    .global-nav-items {
      overflow: hidden;
      height: 28px;
      &.active {
        position: absolute;
        height: 200px;
        z-index: 100;
        ul {
          background: #fff;
        }
      }
      li {
        display: block;
      }
      a.bn-more {
        display: none;
      }
    }
    .top-nav-info a {
      padding-right: 0;
    }
  }
  #db-nav-sns {
    margin-bottom: 0;
    min-width: 0;
    .nav-logo {
      width: 100px !important;
      height: 30px !important;
      margin-left: 10px !important;
      background-size: 100px auto;
    }
    .nav-search {
        display: none;
    }
    .nav-wrap .nav-primary{
      padding-top: 4px;
      padding-bottom: 12px;
    }
    .local-label {
      margin-top: 11px;
    }
    .nav-items {
      display: none;
    }
  }

  #footer {
    text-align: right;
    .copyright {
      float: left;
    }
  }

  #db-usr-profile {
    .pic {
      width: 36px;
      margin-right: 10px;
    }
    .pic img {
      width: 100%;
    }
    .info {
      padding-left: 50px;
    }
    h1 {
      font-size: 18px;
      margin-top: -8px;
    }
  }

  .mobile-app-entrance {
    margin-bottom: 40px;
  }

}

// common ui
@media #{$within_md} {
  .fwrap, #wrapper {
    padding-left: 10px;
    padding-right: 10px;
    width: auto;
  }
  .grid-free,
  .grid-16-8 {
    .article, .aside {
      width: 100%;
      float: none;
      margin: 0;
      padding-right: 0;
      padding-left: 0;
    }
    .article {
      margin-bottom: 30px;
    }
  }
}

// loc specific
@media #{$within_md} {
  .ui-slide-control {
    display: none;
  }
  .ui-slide-screen {
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    .ui-slide-contents {
      width: auto;
      white-space: nowrap;
      > li, > div {
        white-space: normal;
      }
    }
  }
  iframe {
    max-width: 100%;
  }
  #event-info {
    width: auto;
  }
  .events-in-year .meta {
    width: auto;
  }
  #db-events-guess .bd {
    width: auto;
  }
  #dale_event_subject_bottom_super_banner {
    display: none;
  }
}
@media (max-width: 540px) {
  .perf-metric {
    display: none;
  }
  #db-nav-sns {
    .nav-search {
        position: relative !important;
      float: none;
    }
    .inp {
      width: 100% !important;
      float: none;
      display: block;
    }
  }

  .event-detail-photo {
    white-space: nowrap;
    width: auto;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    li {
      display: inline-block;
      float: none;
    }
    img {
      border: 1px solid #eee;
    }
  }
  .event-videos {
    display: none;
  }
  .no-result {
    min-height: 150px;
  }
  .article .no-result {
    min-height: 150px;
    height: auto;
  }

  td.selected-num, td.selected-price {
    width: auto;
    white-space: nowrap;
    min-width: 40px;
    padding: 5px
  }

  .search-item-pics {
    display: none;
  }
}
@media (max-width: 500px) {
  .eventwrap {
    #poster_img {
      width: 165px;
      height: auto;
    }
  }
}
@media #{$within_xs} {
  .eventwrap {
    position: relative;
    padding-top: 70px;
    .poster {
      float: none;
      display: block;
      margin-bottom: 20px;
      text-align: center;
      padding-right: 0;
    }
    h1 {
      position: absolute;
      height: 52px;
      padding: 0;
      overflow: hidden;
      top: 0;
      font-size: 18px;
    }
    #poster_img {
      width: 100%;
      max-width: 220px;
      height: auto;
    }
  }
  #event-info .event-info {
    min-height: 100px;
  }
  .items-table .pic {
    width: 80px;
  }
  .interest-form-ft .sync-setting {
    label {
      display: inline-block;
      margin-top: 0;
    }
    input[type=checkbox] {
      margin: 0;
      margin-right: 2px;
      display: inline-block;
      vertical-align: middle;
    }
    float: none;
    max-height: 1.6em;
    overflow: hidden;
    margin-bottom: 10px;
  }
}

@media #{$within_xs} {
  h1 {
    padding-bottom: 20px;
  }

  .list-entry {
    overflow: hidden;
    padding: 18px 0;
  }

  .events-list-psmall {
    .pic {
      float: left;
      width: 110px;
      margin-right: 10px;

      img {
        max-width: 100%;
      }
    }
    .info {
      margin-left: 120px;
      font-size: 12px;
      color: #666;

      .title {
        padding-bottom: 7px;
        font-size: 14px;
      }
    }

    .counts {
      display: inline-block;
      margin-top: 10px;
      font-size: 12px;
      background: #f5f5f5;

      span {
        display: inline-block;
        padding: 4px 6px 2px 6px;
        vertical-align: top;

        &.pipe {
          padding: 0;
          margin-top: 6px;
          width: 1px;
          height: 12px;
          vertical-align: middle;
          background: #ddd;
        }
      }
    }
  }

  .events-list-pic70 {
    .pic {
      float: left;
    }

    .info {
      margin-left: 80px;
      font-size: 12px;
      color: #666;
    }

    .title a {
      font-size: 13px;
    }
  }

  .events-in-year {
    margin: 0 0 40px;
  }

  .events-in-year .detail .pic {
    float: left;
  }

  .paginator {
    font-size: 12px;

    a {
      padding: 5px 8px;
      margin: 1px;
    }
  }

  .nav .nav-primary {
    padding-top: 8px;
    width: 100% !important;
  }

  #db-usr-profile {
    // padding: 0 10px;

    .pic {
      width: 36px;
      margin-right: 10px;
      margin-left: 10px;
    }
    .pic img {
      width: 100%;
    }
    .info {
      padding-left: 60px;
      margin-right: 10px;

      p {
        font-size: 12px;
      }
    }
    h1 {
      font-size: 18px;
      margin-top: 0;
      margin-bottom: 5px;
      // margin-top: -8px;
    }
  }

  #footer {
    text-align: center;
    .copyright {
      float: none;
    }
  }


  .article .event-mod .hd h2 {
    width: auto;
    padding-right: 12px;
  }
  .tabs a {
    margin-right: 3px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .meta-title {
    display: inline-block;
    margin-right: -5px;
  }

  .buy-friends {
    margin-top: 10px;
    float: none;
  }

  .row.footer .item {
    margin-left: 0;
    text-align: right;
  }
  .user-input {
    width: 90%;
  }
  .buy-sync {
    margin-top: 20px;
    float: none;
  }
}

@media (min-width: 809px) and #{$within_md} {
  // home page
  .action-buttons {
    float: right;
    padding-right: 50px;
  }
  .action-buttons a.bn-big-action {
    display: block;
    margin: 0 auto 20px;
  }
  .cats-board {
    margin-right: 200px;
  }
}

@media (max-width: 600px) {
  .events-list-2col .list-entry {
    width: auto;
  }
}
