/* 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);

/* 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-margin-end: 8px;
}

/* ::::: tabs ::::: */

/* ::: new tab buttons ::: */
@media not all and (-moz-mac-yosemite-theme) {
  #calendar-tab-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#calendar-tab);
  }

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

@media (-moz-mac-yosemite-theme) {
  #calendar-tab-button {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#calendar-tab-flat);
  }

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

/* ::: 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(0px 64px 16px 48px);
}

.icon-holder[type="calendar"][selected="true"],
.tabmail-tab[type="calendar"][selected="true"] {
    -moz-image-region: rect(16px 64px 32px 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(0px 80px 16px 64px);
}

.icon-holder[type="tasks"][selected="true"],
.tabmail-tab[type="tasks"][selected="true"] {
    -moz-image-region: rect(16px 80px 32px 64px);
}

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

/* Write button */
@media not all and (-moz-mac-yosemite-theme) {
  #newMsgButton-mail-menuitem {
      list-style-image: url(chrome://messenger/skin/icons/mail-toolbar.svg#newmsg);
  }

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

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

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

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

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

#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;
}

/* 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;
  padding: 0 2px !important;
  border: 1px solid transparent;
  border-radius: 3px;
  background-color: transparent;
  transition-property: background, border-color;
  transition-duration: 250ms;
}

#calendar-status-todaypane-button:hover,
#calendar-status-todaypane-button[checked="true"]:hover {
  border-color: hsla(0, 0%, 0%, .2);
  background: hsla(0, 0%, 100%, .1) linear-gradient(hsla(0, 0%, 100%, .3),
              hsla(0, 0%, 100%,.1)) padding-box;
  box-shadow: 0 1px 0 hsla(0, 0%, 100%, .5), 0 1px 0 hsla(0, 0%, 100%, .5) inset;
}

#calendar-status-todaypane-button[checked="true"] {
  background: linear-gradient(hsla(0, 0%, 0%, .12),
              hsla(0, 0%, 0%, 0)) border-box;
  border-color: hsla(0, 0%, 0%, .3);
  box-shadow: 0 1px 0 hsla(0, 0%, 100%, .5),
              0 1px 0 hsla(0, 0%, 0%, .05) inset,
              0 1px 1px hsla(0, 0%, 0%, .2) inset;
  transition-duration: 10ms;
}

@media not all and (-moz-mac-yosemite-theme) {
  #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);
  }
}

@media (-moz-mac-yosemite-theme) {
  #calendar-status-todaypane-button > stack > .toolbarbutton-icon-begin {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#pane-flat);
    width: 18px;
    height:18px;
  }
}

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

#calendar-status-todaypane-button > stack > .toolbarbutton-day-text {
  -moz-margin-end: 4px;
  color: #0969B2;
}

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

#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);
}

#calMinimonthBox {
    margin-top: 3px;
}

.calendar-splitter {
  height: 8px !important;
  min-height: 8px;
  background-image: url("chrome://messenger/skin/icons/vertical-threadpane-splitter-bg.gif");
  background-repeat: repeat-y;
  -moz-border-start: 1px solid #A6A6A6;
  -moz-border-end: 1px solid #8C8C8C;
}

.calendar-splitter:-moz-locale-dir(rtl) {
  background-image: url("chrome://messenger/skin/icons/vertical-threadpane-splitter-bg-rtl.gif");
}

/* The orient="vertical" isn't which direction the splitter itself runs, it's
   actually which way its parent lays out its children, so when it's vertical,
   the splitter is a horizontal bar. */
.calendar-splitter[orient="vertical"] {
  background-image: url("chrome://messenger/skin/icons/threadpane-splitter-bg.gif");
  background-repeat: repeat-x;
  border-top: 1px solid #A6A6A6;
  border-bottom: 1px solid #8C8C8C;
  -moz-border-start-width: 0;
  -moz-border-end-width: 0;
}

.calendar-splitter[state="collapsed"] {
  border-bottom-width: 0;
  -moz-border-end: 0;
}

.calendar-sidebar-splitter {
  background-image: none;
  min-width: 3px;
  width: 3px;
}

#today-splitter {
  -moz-border-start: 1px solid #8B8B8B;
  -moz-margin-end: -2px;
  position: relative;
}

#ltnSidebar {
  -moz-border-end: 1px solid #8B8B8B;
  -moz-margin-end: -3px !important;
}

/* ::: imip button icons ::: */
@media not all and (-moz-mac-yosemite-theme) {
  .imipAcceptRecurrencesButton,
  .imipAcceptButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#complete);
  }

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

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

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

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

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

  .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);
  }
}

@media (-moz-mac-yosemite-theme) {
  .imipAcceptRecurrencesButton,
  .imipAcceptButton {
    list-style-image: url(chrome://calendar-common/skin/calendar-toolbar.svg#complete-flat);
  }

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

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

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

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

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

  .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-flat);
  }
}
