/* 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://lightning-common/skin/lightning.css);

#calendarContent {
    color: -moz-DialogText;
    background-color: -moz-Dialog;
}

/* Calendar list rules */
#calendar-panel {
    padding-bottom: 5px;
}

/* Lightning preferences icon */
radio[pane=paneLightning] {
    list-style-image: url(chrome://calendar/skin/cal-icon32.png);
}

/* iMIP notification bar */
#imip-bar > image {
    list-style-image: url(chrome://calendar/skin/cal-icon32.png);
    -moz-image-region: rect(0 32px 32px 0);
}

/* Lightning sidebar background in calendar and task mode */
#ltnSidebar {
  background-color: -moz-field;
}

/* Today pane button in status bar */
#calendar-status-todaypane-button,
#calendar-status-todaypane-button[checked="true"] {
  min-width: 0;
  min-height: 0;
  margin: 1px 0 0;
  -moz-appearance: none;
  border-radius: 3px;
  padding: 1px 2px 0 !important;
  border: 1px solid transparent;
}

#calendar-status-todaypane-button:hover {
  border: 1px solid ThreeDShadow;
  background-color: transparent !important;
  background-image: none;
  -moz-appearance: none;
}

#calendar-status-todaypane-button[hideLabel] > stack {
  margin-inline-start: 5px;
}

#calendar-status-todaypane-button > stack > .toolbarbutton-day-text {
  margin-top: 4px;
}

#calendar-status-todaypane-button > .toolbarbutton-icon-end {
  list-style-image: url(chrome://global/skin/icons/collapse.png);
}

#calendar-status-todaypane-button[checked="true"] > .toolbarbutton-icon-end {
  list-style-image: url(chrome://global/skin/icons/expand.png);
}

/* shift the today pane button label up by one pixel to center it */
#calendar-status-todaypane-button > .toolbarbutton-text {
  margin: 0 0 1px !important;
}

#calMinimonthBox {
    margin-top: 3px;
}

@media (-moz-os-version: windows-xp) {
  #calsidebar_splitter {
      border-right: none;
  }

  #today-splitter {
      border-right: none;
  }

  #today-splitter:-moz-lwtheme {
      background-image: linear-gradient(rgba(255, 255, 255, 0.5),
                        rgba(255, 255, 255, 0) 19px, rgba(255, 255, 255, 0) 25px,
                        ThreeDDarkShadow 25px, -moz-Dialog 26px);
  }

  #newMsgButton-mail-menuitem {
    list-style-image: url(chrome://messenger/skin/icons/mail-toolbar-small.png);
    -moz-image-region: rect(0 32px 16px 16px);
  }

  #newMsgButton-calendar-menuitem {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 16px 16px 0);
  }

  #newMsgButton-task-menuitem {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 256px 16px 240px);
  }

  #calendar-status-todaypane-button > stack > .toolbarbutton-icon-begin {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 336px 16px 320px);
  }

  /* ::: new tab buttons ::: */
  #calendar-tab-button {
    list-style-image: url(chrome://lightning-common/skin/mode-switch-icons.png);
    -moz-image-region: rect(0 64px 16px 48px);
  }

  #calendar-tab-button[disabled] {
    -moz-image-region: rect(32px 64px 48px 48px);
  }

  #task-tab-button {
    list-style-image: url(chrome://lightning-common/skin/mode-switch-icons.png);
    -moz-image-region: rect(0 80px 16px 64px);
  }

  #task-tab-button[disabled] {
    -moz-image-region: rect(32px 80px 48px 64px);
  }

  /* ::: tab icons ::: */
  .icon-holder[type="calendar"],
  .tabmail-tab[type="calendar"] {
    list-style-image: url(chrome://lightning-common/skin/mode-switch-icons.png);
    -moz-image-region: rect(0 64px 16px 48px);
  }

  .icon-holder[type="tasks"],
  .tabmail-tab[type="tasks"] {
    list-style-image: url(chrome://lightning-common/skin/mode-switch-icons.png);
    -moz-image-region: rect(0 80px 16px 64px);
  }

  /* ::: imip button icons ::: */
  .imipAcceptButton,
  .imipAcceptRecurrencesButton {
    list-style-image: url(chrome://lightning/skin/imip.png);
    -moz-image-region: rect(0 16px 16px 0);
  }

  .imipDeclineButton,
  .imipDeclineRecurrencesButton {
    list-style-image: url(chrome://lightning/skin/imip.png);
    -moz-image-region: rect(0 32px 16px 16px);
  }

  .imipTentativeButton,
  .imipTentativeRecurrencesButton {
    list-style-image: url(chrome://lightning/skin/imip.png);
    -moz-image-region: rect(0 48px 16px 32px);
  }

  .imipAddButton {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 16px 16px 0);
  }

  .imipUpdateButton {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 432px 16px 416px);
  }

  .imipDetailsButton {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 352px 16px 336px);
  }

  .imipDeleteButton {
    list-style-image: url(chrome://calendar/skin/toolbar-small.png);
    -moz-image-region: rect(0 48px 16px 32px);
  }

  .imipReconfirmButton {
    list-style-image: url(chrome://calendar/skin/tasks-actions.png);
    -moz-image-region: rect(0 48px 16px 32px);
  }
}

@media not all and (-moz-os-version: windows-xp) {
  #calendar-tab-button,
  #newMsgButton-calendar-menuitem {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#calendar-tab);
    -moz-image-region: auto;
  }

  #task-tab-button,
  #newMsgButton-task-menuitem {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#task-tab);
    -moz-image-region: auto;
  }

  #newMsgButton-mail-menuitem {
    list-style-image: url(chrome://messenger/skin/icons/mail-toolbar.svg#newmsg);
  }

  #tabs-toolbar[brighttext] #calendar-tab-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#calendar-tab-inverted);
  }

  #tabs-toolbar[brighttext] #task-tab-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#task-tab-inverted);
  }

  #calendar-status-todaypane-button > stack > .toolbarbutton-icon-begin {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#pane);
    -moz-image-region: rect(0 18px 18px 0);
  }

#calendar-status-todaypane-button:-moz-lwtheme-brighttext > stack >
  .toolbarbutton-icon-begin {
  list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#pane-inverted);
  }
  /* compensate the 18px icon height */
  #calendar-status-todaypane-button > stack > .toolbarbutton-icon-begin {
    margin-top: -1px;
    margin-bottom: -1px;
  }

  .icon-holder[type="calendar"],
  .tabmail-tab[type="calendar"] {
    list-style-image: url(chrome://lightning/skin/mode-switch-icons-aero.png);
    -moz-image-region: rect(16px 16px 32px 0);
  }

  .icon-holder[type="tasks"],
  .tabmail-tab[type="tasks"] {
    list-style-image: url(chrome://lightning/skin/mode-switch-icons-aero.png);
    -moz-image-region: rect(16px 32px 32px 16px);
  }

  /* ::: imip button icons ::: */
  .imipAcceptButton,
  .imipAcceptRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#complete);
  }

  .imipDeclineCounterButton,
  .imipDeclineButton,
  .imipDeclineRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#decline);
  }

  .imipTentativeButton,
  .imipTentativeRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#tentative);
  }

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

  .imipRescheduleButton,
  .imipUpdateButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#synchronize);
  }

  .imipDetailsButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#find);
  }

  .imipDeleteButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#delete);
  }

  .imipReconfirmButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#priority);
  }

  #newMsgButton-mail-menuitem > .menu-iconic-left > .menu-iconic-icon,
  #newMsgButton-calendar-menuitem > .menu-iconic-left > .menu-iconic-icon,
  #newMsgButton-task-menuitem > .menu-iconic-left > .menu-iconic-icon {
    width: 18px;
    height: 18px;
    margin: -1px;
  }

  #calsidebar_splitter,
  #today-splitter {
    border: none;
    min-width: 0;
    width: 5px;
    background-color: transparent;
    margin-top: 0;
    position: relative;
    z-index: 10;
    transition: border-width .3s ease-in;
  }

  #calsidebar_splitter {
    border-inline-start: 1px solid #a9b7c9;
    margin-inline-end: -5px;
  }

  #calsidebar_splitter[state="collapsed"] {
    border-inline-start: 1px solid transparent;
  }

  #calsidebar_splitter[state="collapsed"]:hover {
    border-inline-start: 4px solid highlight;
  }

  #today-splitter {
    border-inline-end: 1px solid #a9b7c9;
    margin-inline-start: -5px;
    position: relative;
  }

  #today-splitter.calendar-sidebar-splitter:-moz-lwtheme {
    background-image: none;
  }

  #today-splitter > grippy {
    display: none;
  }

  #today-pane-splitter {
    border: none;
    border-bottom: 3px double #a9b7c9;
    min-height: 0;
    height: 5px;
    background-color: transparent;
    margin-top: -3px;
    position: relative;
    z-index: 10;
  }
}

@media (-moz-windows-default-theme) and (-moz-os-version: windows-win8),
       (-moz-windows-default-theme) and (-moz-os-version: windows-win10) {
  #calendar-tab-button,
  #newMsgButton-calendar-menuitem {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#calendar-tab-flat);
    -moz-image-region: auto;
  }

  #task-tab-button,
  #newMsgButton-task-menuitem {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#task-tab-flat);
    -moz-image-region: auto;
  }

  #newMsgButton-mail-menuitem {
    list-style-image: url(chrome://messenger/skin/icons/mail-toolbar.svg#newmsg-flat);
  }

  #calendar-status-todaypane-button > stack > .toolbarbutton-icon-begin {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#pane-flat);
  }

  /* ::: imip button icons ::: */
  .imipAcceptButton,
  .imipAcceptRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#complete-flat);
  }

  .imipDeclineCounterButton,
  .imipDeclineButton,
  .imipDeclineRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#decline-flat);
  }

  .imipTentativeButton,
  .imipTentativeRecurrencesButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#tentative-flat);
  }

  .imipAddButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#newevent-flat);
  }

  .imipRescheduleButton,
  .imipUpdateButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#synchronize-flat);
  }

  .imipDetailsButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#find-flat);
  }

  .imipReconfirmButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#priority-flat);
  }
}
