/* Keep dimensions independent of theme and Elementor resets. */
.pcwp-widget,
.pcwp-widget *,
.pcwp-widget *::before,
.pcwp-widget *::after {
  box-sizing: border-box;
}

/*
 * Planning Center for WP -- frontend styles.
 *
 * F20: every selector below is scoped under .pcwp-widget (the wrapper
 * every shortcode's rendered output is enclosed in -- see
 * Planning_Center_WP_Shortcodes::wrap_widget_output()), so this
 * plugin's necessarily generic-looking class names (.center, .close,
 * .col-6, ...) can only ever match elements this plugin itself rendered.
 * They can neither leak onto, nor be overridden by, an unrelated
 * Elementor widget or theme element elsewhere on the same page that
 * happens to reuse one of the same class names. Previously unscoped,
 * dead rules targeting classes this plugin never actually renders
 * (.navtop, .content, .justify) have been removed; every class still
 * referenced below is emitted by includes/class-shortcodes.php or
 * includes/vendor/calendar.php.
 */

.pcwp-widget .left {
  text-align: left;
}

.pcwp-widget .right {
  text-align: right;
}

.pcwp-widget .center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ==== GRID SYSTEM ==== */

.pcwp-widget .pcwp-container {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.pcwp-widget .pcwp-row {
  position: relative;
  width: 100%;
}

.pcwp-widget .pcwp-row [class^="col"] {
  float: left;
  margin: 0.5rem 2%;
  min-height: 0.125rem;
}

.pcwp-widget .col-1,
.pcwp-widget .col-2,
.pcwp-widget .col-3,
.pcwp-widget .col-4,
.pcwp-widget .col-5,
.pcwp-widget .col-6,
.pcwp-widget .col-7,
.pcwp-widget .col-8,
.pcwp-widget .col-9,
.pcwp-widget .col-10,
.pcwp-widget .col-11,
.pcwp-widget .col-12 {
  width: 96%;
}

.pcwp-widget .col-1-sm {
  width: 4.33%;
}

.pcwp-widget .col-2-sm {
  width: 12.66%;
}

.pcwp-widget .col-3-sm {
  width: 21%;
}

.pcwp-widget .col-4-sm {
  width: 29.33%;
}

.pcwp-widget .col-5-sm {
  width: 37.66%;
}

.pcwp-widget .col-6-sm {
  width: 46%;
}

.pcwp-widget .col-7-sm {
  width: 54.33%;
}

.pcwp-widget .col-8-sm {
  width: 62.66%;
}

.pcwp-widget .col-9-sm {
  width: 71%;
}

.pcwp-widget .col-10-sm {
  width: 79.33%;
}

.pcwp-widget .col-11-sm {
  width: 87.66%;
}

.pcwp-widget .col-12-sm {
  width: 96%;
}

.pcwp-widget .pcwp-row::after {
  content: "";
  display: table;
  clear: both;
}

.pcwp-widget .hidden-sm {
  display: none;
}

@media only screen and (min-width: 33.75em) {  /* 540px */
  .pcwp-widget .pcwp-container {
    width: 80%;
  }
  .pcwp-widget .pcwp-row {
    display: flex;
    flex-direction: row-reverse;
  }
}

@media only screen and (min-width: 45em) {  /* 720px */
  .pcwp-widget .col-1 {
    width: 4.33%;
  }

  .pcwp-widget .col-2 {
    width: 12.66%;
  }

  .pcwp-widget .col-3 {
    width: 21%;
  }

  .pcwp-widget .col-4 {
    width: 29.33%;
  }

  .pcwp-widget .col-5 {
    width: 37.66%;
  }

  .pcwp-widget .col-6 {
    width: 46%;
  }

  .pcwp-widget .col-7 {
    width: 54.33%;
  }

  .pcwp-widget .col-8 {
    width: 62.66%;
  }

  .pcwp-widget .col-9 {
    width: 71%;
  }

  .pcwp-widget .col-10 {
    width: 79.33%;
  }

  .pcwp-widget .col-11 {
    width: 87.66%;
  }

  .pcwp-widget .col-12 {
    width: 96%;
  }

  .pcwp-widget .hidden-sm {
    display: block;
  }
  .pcwp-widget .pcwp-row {
    display: flex;
    flex-direction: row;
  }
}

@media only screen and (min-width: 60em) { /* 960px */
  .pcwp-widget .pcwp-container {
    width: 75%;
    max-width: 60rem;
  }
  .pcwp-widget .pcwp-row {
    display: flex;
    flex-direction: row;
  }
}

/* Order of Service / Announcements (F17: previously a <style> block
   re-printed on every single render of services()/announcements(),
   instead of being part of this one registered, loaded-once stylesheet). */
.pcwp-widget .OoS h2,
.pcwp-widget .OoS h3,
.pcwp-widget .OoS h4,
.pcwp-widget .OoS p,
.pcwp-widget .Ann h2,
.pcwp-widget .Ann h3,
.pcwp-widget .Ann h4,
.pcwp-widget .Ann p {
  margin: 0;
}
.pcwp-widget .OoS .mb-1,
.pcwp-widget .Ann .mb-1 {
  margin-bottom: 0.5rem;
}
.pcwp-widget .OoS .mt-4,
.pcwp-widget .Ann .mt-4 {
  margin-top: 2rem;
}
.pcwp-widget .OoS .PlanHeader h4,
.pcwp-widget .Ann .PlanHeader h4 {
  text-transform: uppercase;
  color: gray;
  font-size: 14px;
}
.pcwp-widget .OoS .PlanSong p,
.pcwp-widget .OoS .PlanItem p,
.pcwp-widget .OoS .PlanOther p {
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4em;
}
.pcwp-widget .Ann .PlanSong p,
.pcwp-widget .Ann .PlanItem p,
.pcwp-widget .Ann .PlanOther p {
  font-size: 16px;
  line-height: 1.4em;
}

/* Calendar styles */
.pcwp-widget .calendar {
    display: flex;
    flex-flow: column;
}
.pcwp-widget .calendar .header .month-year {
    font-size: 20px;
    font-weight: bold;
    color: #636e73;
    padding: 20px 0;
}

.pcwp-widget .calendar .month-year .arrow {
    padding: 3px 5px;
    border: 2px solid #888;
    border-radius: 50%;
    margin: 0 3px;
    color:#888;
}
.pcwp-widget .calendar .month-year a {
    display: inline-block;
}
.pcwp-widget .calendar .month-year a:focus-visible .arrow,
.pcwp-widget .calendar .month-year a:hover .arrow {
  color: #444;
  border: 2px solid #444;
}
.pcwp-widget .calendar .days {
    display: flex;
    flex-flow: wrap;
}
.pcwp-widget .calendar .days .day_name {
    width: calc(100% / 7);
    border-right: 1px solid #2c7aca;
    padding: clamp(3px, 1vw, 20px);
    text-align: center;
    min-width: 0;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    color: #818589;
    color: #fff;
    background-color: #2F61BA;
}
.pcwp-widget .calendar .days .day_name:nth-child(7) {
    border: none;
}
.pcwp-widget .calendar .days .day_num {
    display: flex;
    flex-flow: column;
    width: calc(100% / 7);
    border-right: 1px solid #e6e9ea;
    border-bottom: 1px solid #e6e9ea;
    padding: clamp(3px, 1vw, 15px);
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: bold;
    color: #7c878d;
    cursor: pointer;
    min-height: 100px;
}
.pcwp-widget .calendar .days .day_num span {
    display: inline-flex;
    width: 30px;
    font-size: 14px;
}
.pcwp-widget .calendar .days .day_num .pcwpEvent {
    display: block;
    width: 100%;
    margin-top: 10px;
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    padding: 3px 6px;
    border: 0;
    border-radius: 4px;
    background-color: #4977BA;
    color: #fff;
    word-wrap: break-word;
    text-align: left;
    cursor: pointer;
}
.pcwp-widget .calendar .days .day_num .pcwpEvent:focus-visible {
    outline: 2px solid #1d3c6b;
    outline-offset: 2px;
}
.pcwp-widget .calendar .days .day_num .pcwpEvent.green {
    background-color: #51ce57;
}
.pcwp-widget .calendar .days .day_num .pcwpEvent.blue {
    background-color: #518fce;
}
.pcwp-widget .calendar .days .day_num .pcwpEvent.red {
    background-color: #ce5151;
}
.pcwp-widget .calendar .days .day_num:nth-child(7n+1) {
    border-left: 1px solid #e6e9ea;
}
.pcwp-widget .calendar .days .day_num:hover {
    background-color: #fdfdfd;
}
.pcwp-widget .calendar .days .day_num.ignore {
    background-color: #fdfdfd;
    color: #ced2d4;
    cursor: inherit;
}
.pcwp-widget .calendar .days .day_num.selected {
    background-color: #f1f2f3;
    cursor: inherit;
}

/* The Modal (background) */
.pcwp-widget .pcwpModal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.pcwp-widget .pcwpModal-content {
  background-color: #eee;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

/* The Close Button (F18: now a real <button>, not a non-interactive
   <span>; reset its default button chrome back to the original look) */
.pcwp-widget .pcwpModal .close {
  background: none;
  border: 0;
  color: #aaaaaa;
  float: right;
  font-size: 28px !important;
  font-weight: bold;
  line-height: 1;
  padding: 0;
}

.pcwp-widget .pcwpModal .close:hover,
.pcwp-widget .pcwpModal .close:focus-visible {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.pcwp-widget .pcwpModal-content p {
  font-size:1em !important;
  color: #444 !important;
}
.pcwp-widget .pcwpModal-content h2 {
  font-size:1.8em !important;
  color: #444 !important;
}
.pcwp-widget .pcwpModal-content h5 {
  font-size:1.4em !important;
  color: #444 !important;
}
.pcwp-widget .pcwp-event-details{
  font-weight: normal;
}

/* Video styles (F19): a true fixed-aspect-ratio box (16:9) sized purely
   by its own width, so a video's reserved space scales consistently at
   every column width instead of the previous flat min-height, which
   could either letterbox (too tall for a narrow column) or clip/
   under-reserve (too short for a wide one). This also directly reduces
   layout shift as each iframe loads. */
.pcwp-widget .video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.pcwp-widget .video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.pcwp-widget img {
  max-width: 100%;
  height: auto;
}

/* Announcement remains available to screen readers after a widget replaces its loader. */
.pcwp-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
