/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

@import url(chrome://calendar-common/skin/today-pane.css);

@media (-moz-os-version: windows-xp),
       (-moz-os-version: windows-vista),
       (-moz-os-version: windows-win7) {
  #today-pane-panel:-moz-lwtheme {
    box-shadow: 0 1px 0 rgba(253, 253, 253, 0.45) inset;
  }
}

#today-pane-panel:-moz-lwtheme > sidebarheader {
  background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 19px);
}

.today-pane-cycler {
  list-style-image: url("chrome://calendar-common/skin/today-pane-cycler.svg#normal");
}

.today-pane-cycler:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://calendar-common/skin/today-pane-cycler.svg#inverted");
}

.today-pane-cycler[dir="prev"]:-moz-locale-dir(ltr) > .toolbarbutton-icon,
.today-pane-cycler[dir="next"]:-moz-locale-dir(rtl) > .toolbarbutton-icon {
  transform: scaleX(-1);
}

.today-subpane {
  border-color: ThreeDShadow;
}

#mini-day-image {
  background-image: linear-gradient(transparent, rgba(0, 0, 0, .1));
}

@media (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  #mini-day-image {
    background-image: none;
  }
}

@media (-moz-os-version: windows-win8) {
  #mini-day-box {
    padding-top: 1px;
    padding-bottom: 1px;
  }
}

.miniday-nav-buttons {
  list-style-image: url("chrome://calendar-common/skin/widgets/nav-arrow.svg");
}

#previous-day-button:-moz-locale-dir(ltr),
#next-day-button:-moz-locale-dir(rtl) {
  transform: scaleX(-1);
}

#miniday-dropdown-button {
  max-width: 18px;
}

.today-closebutton {
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-appearance: none;
  border: none !important;
  padding: 2px;
}

.today-closebutton:not([selected]):not(:hover):-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}

.today-closebutton > .toolbarbutton-icon {
  margin-inline-end: 0px; /* override toolkit's default value */
}

@media (-moz-os-version: windows-xp) {
  #today-pane-panel {
    border-left: 1px solid ThreeDShadow;
  }

  .today-pane-cycler {
    padding-inline-end: 0;
  }

  #todaypane-new-event-button {
    list-style-image: url("chrome://calendar/skin/toolbar-small.png");
    -moz-image-region: rect(0px 16px 16px 0px);
  }
  #todaypane-new-event-button[disabled="true"] {
    -moz-image-region: rect(32px 16px 48px 0px);
  }
}

@media not all and (-moz-os-version: windows-xp) {
  #today-none-box {
    border-top: 1px solid ThreeDShadow;
  }

  .today-pane-cycler {
    padding-inline-start: 5px;
    padding-inline-end: 5px;
  }

  #todaypane-new-event-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#newevent);
  }

  #todaypane-new-event-button[disabled="true"] > .toolbarbutton-icon {
    opacity: 0.4;
  }

  #todaypane-new-event-button > .toolbarbutton-icon {
    width: 18px;
    height: 18px;
    margin: -1px;
  }

  @media (-moz-windows-default-theme) {
    #today-pane-panel > sidebarheader {
      -moz-appearance: none;
      background-color: #f8f8f8;
      border-bottom: none;
    }

    #today-pane-panel:-moz-lwtheme > sidebarheader {
      background-color: rgba(255, 255, 255, 0.3);
      background-image: linear-gradient(rgba(255, 255, 255, 0.5),
                        rgba(255, 255, 255, 0) 28px);
      border-top: 1px solid rgba(253, 253, 253, 0.45);
    }

    sidebarheader > spacer {
      min-height: 25px;
    }
  }
}

@media all and (-moz-windows-compositor) {
  @media not all and (-moz-os-version: windows-win10) {
    #messengerWindow[sizemode=normal] #today-pane-panel {
      border-inline-end: 1px solid rgba(10%, 10%, 10%, .4);
      border-bottom: 1px solid rgba(10%, 10%, 10%, .4);
      background-clip: padding-box;
    }
  }

  .today-pane-cycler {
    margin-top: -1px;
  }
}

@media (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  .today-closebutton {
    padding-top: 0;
    padding-bottom: 0;
    -moz-image-region: rect(0 20px 20px 0);
  }

  .today-closebutton:hover {
    -moz-image-region: rect(0 40px 20px 20px);
  }

  .today-closebutton:hover:active {
    -moz-image-region: rect(0 60px 20px 40px);
  }
}

@media (-moz-windows-default-theme) and (-moz-os-version: windows-win8),
       (-moz-windows-default-theme) and (-moz-os-version: windows-win10) {
  #todaypane-new-event-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#newevent-flat);
  }
}
