/* ==========================================================================
   APP SPACES — Google Calendar layout style
   ========================================================================== */

:host {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.gc-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #ffffff;
  color: #3c4043;
  font-family: 'Roboto', 'Inter', system-ui, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

/* ═══════════════════════════════ HEADER (TOPBAR) ═══════════════════════════════ */
.gc-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #dadce0;
  background: #ffffff;
  flex-shrink: 0;
  box-sizing: border-box;
}

.gc-header__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-header__menu-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  outline: none;
}

.gc-header__menu-btn:hover {
  background: #f1f3f4;
}

.gc-header__menu-btn svg {
  width: 20px;
  height: 20px;
}

.gc-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 24px;
  user-select: none;
}

.gc-header__logo-icon {
  width: 40px;
  height: 40px;
  background-image: url('https://ssl.gstatic.com/calendar/images/dynamiclogo_2020q4/calendar_16_2x.png');
  background-size: contain;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gc-header__logo-icon span {
  font-size: 13.5px;
  font-weight: 700;
  color: #1a73e8;
  margin-top: 6px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.gc-header__logo-text {
  font-size: 22px;
  color: #5f6368;
  font-weight: 400;
  font-family: 'Product Sans', 'Google Sans', 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.gc-header__btn {
  background: #ffffff;
  border: 1px solid #dadce0;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: background-color 0.15s;
}

.gc-header__btn:hover {
  background: #f1f3f4;
}

.gc-header__btn--rounded {
  padding: 8px 16px;
  border-radius: 4px;
  margin-right: 12px;
}

.gc-header__nav {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.gc-header__nav-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.gc-header__nav-btn:hover {
  background: #f1f3f4;
}

.gc-header__title {
  font-size: 20px;
  font-weight: 400;
  color: #3c4043;
  margin: 0;
}

.gc-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-header__search-container {
  position: relative;
  width: 240px;
  margin-right: 16px;
}

.gc-header__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6368;
  pointer-events: none;
}

.gc-header__search-input {
  width: 100%;
  background: #f1f3f4;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  font-size: 14px;
  color: #3c4043;
  outline: none;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.gc-header__search-input:focus {
  background: #ffffff;
  border-color: #dadce0;
  box-shadow: 0 1px 3px rgba(60,64,67,0.15);
}

.gc-header__icon-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  outline: none;
}

.gc-header__icon-btn:hover {
  background: #f1f3f4;
}

.gc-header__view-select {
  margin-right: 8px;
}

.gc-header__view-trigger {
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
}

.gc-header__view-trigger:hover {
  background: #f1f3f4;
}

.gc-header__view-arrow {
  font-size: 8px;
  color: #5f6368;
}

.gc-header__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  cursor: pointer;
}

/* ═══════════════════════════════ LAYOUT BODY ═══════════════════════════════ */
.gc-body {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* ── SIDEBAR IZQUIERDO (256px) ── */
.gc-left-sidebar {
  width: 256px;
  flex-shrink: 0;
  border-right: 1px solid #dadce0;
  background: #ffffff;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.gc-left-sidebar::-webkit-scrollbar {
  width: 4px;
}

.gc-left-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.gc-left-sidebar:hover::-webkit-scrollbar-thumb {
  background: #dadce0;
}

/* Pill style "+ Crear" button */
.gc-sidebar-create {
  padding: 4px 0 12px;
}

.gc-btn-create {
  height: 48px;
  padding: 0 24px 0 8px;
  background: #ffffff;
  border: none;
  border-radius: 24px;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, background-color 0.15s;
  outline: none;
}

.gc-btn-create:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 3px rgba(60,64,67,0.3), 0 6px 10px 4px rgba(60,64,67,0.15);
}

.gc-btn-create__icon {
  width: 36px;
  height: 36px;
}

.gc-btn-create__text {
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  font-family: 'Google Sans', Roboto, sans-serif;
  letter-spacing: 0.25px;
}

.gc-btn-create__arrow {
  font-size: 8px;
  color: #5f6368;
  margin-left: 4px;
}

/* Mini monthly calendar */
.gc-mini-calendar {
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}

.gc-mini-calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 8px;
}

.gc-mini-calendar__title {
  font-size: 13.5px;
  font-weight: 500;
  color: #3c4043;
}

.gc-mini-calendar__nav {
  display: flex;
  gap: 4px;
}

.gc-mini-calendar__nav-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
}

.gc-mini-calendar__nav-btn:hover {
  background: #f1f3f4;
}

.gc-mini-calendar__days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: #70757a;
  margin-bottom: 4px;
}

.gc-mini-calendar__days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
  text-align: center;
}

.gc-mini-calendar__day {
  height: 24px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  color: #3c4043;
}

.gc-mini-calendar__day:hover {
  background: #f1f3f4;
}

.gc-mini-calendar__day--inactive {
  color: #a0a5ab;
}

.gc-mini-calendar__day--active {
  background: #1a73e8 !important;
  color: #ffffff !important;
  font-weight: bold;
}

/* Sidebar Search Box */
.gc-sidebar-search {
  padding: 0 4px;
}

.gc-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 6px 12px;
  background: #ffffff;
}

.gc-search-box__icon {
  font-size: 18px;
  color: #5f6368;
}

.gc-search-box__input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: #3c4043;
}

.gc-search-box__input::placeholder {
  color: #70757a;
}

/* Collapsible Accordions (Mis Calendarios) */
.gc-accordion {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #dadce0;
  padding-top: 12px;
}

.gc-accordion__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 4px 8px;
  user-select: none;
}

.gc-accordion__header:hover {
  background: #f1f3f4;
  border-radius: 4px;
}

.gc-accordion__title {
  font-size: 13.5px;
  font-weight: 500;
  color: #3c4043;
}

.gc-accordion__chevron {
  font-size: 18px;
  color: #5f6368;
}

.gc-accordion__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 0 4px;
}

.gc-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12.5px;
  color: #3c4043;
}

.gc-checkbox-item:hover {
  background: #f1f3f4;
}

.gc-checkbox-item__input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #1a73e8; /* Default */
}

.gc-checkbox-item__input--blue { accent-color: #1a73e8; }
.gc-checkbox-item__input--green { accent-color: #0f9d58; }
.gc-checkbox-item__input--yellow { accent-color: #f4b400; }
.gc-checkbox-item__input--purple { accent-color: #ab47bc; }

/* Accordion for Reservas list */
.gc-accordion--reservas {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gc-accordion__content--scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.gc-activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-bottom: 1px solid #f1f3f4;
}

.gc-activity-item:last-child {
  border-bottom: none;
}

.gc-activity-item__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.gc-activity-item__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gc-activity-item__title {
  font-size: 12px;
  color: #202124;
}

.gc-activity-item__desc {
  font-size: 11px;
  color: #5f6368;
  line-height: 1.3;
}

.gc-activity-item__time {
  font-size: 9.5px;
  color: #9aa0a6;
}

/* ── CENTRAL CALENDAR VIEW (GRID LAYOUT WEEK VIEW) ── */
.gc-main-calendar {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  min-width: 0;
  position: relative;
}

/* Columns Day/Resource Headers */
.gc-grid-header {
  height: 96px;
  border-bottom: 1px solid #dadce0;
  display: flex;
  flex-shrink: 0;
}

.gc-grid-header__corner {
  width: 60px;
  border-right: 1px solid #dadce0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.gc-corner-gmt {
  font-size: 10px;
  color: #70757a;
}

.gc-grid-header__columns {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  height: 100%;
}

.gc-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #dadce0;
  text-align: center;
  padding: 4px 8px;
  background: #ffffff;
  min-width: 0;
}

.gc-col-header:last-child {
  border-right: none;
}

.gc-col-header__day {
  font-size: 11px;
  font-weight: 500;
  color: #70757a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.gc-col-header__day-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
  font-size: 16px;
  background: #f1f3f4;
}

.gc-col-header__day-circle--active {
  background: #1a73e8;
  color: #ffffff;
}

.gc-col-header__name {
  font-size: 12.5px;
  font-weight: bold;
  color: #3c4043;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Scrollable Time Grid Area */
.gc-grid-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  background: #ffffff;
  position: relative;
}

.gc-grid-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.gc-grid-scroll-area::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 4px;
}

.gc-grid-body {
  display: flex;
  position: relative;
  min-height: 600px;
}

/* Left scale column of hours */
.gc-hours-column {
  width: 60px;
  border-right: 1px solid #dadce0;
  flex-shrink: 0;
}

.gc-hour-cell {
  height: 72px; /* Fixed height for scheduler slots */
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-right: 8px;
}

.gc-hour-label {
  font-size: 11px;
  color: #70757a;
  position: relative;
  top: -6px;
}

/* Columns for calendar events and cells */
.gc-columns-grid {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  position: relative;
}

/* Red Time Indicator Line */
.gc-current-time-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ea4335;
  z-index: 10;
  pointer-events: none;
}

.gc-current-time-line__circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ea4335;
  position: absolute;
  left: -4px;
  top: -3px;
}

/* Resource Column container */
.gc-resource-column {
  border-right: 1px solid #dadce0;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gc-resource-column:last-child {
  border-right: none;
}

/* Grid Cell block (hour slot) */
.gc-grid-slot-cell {
  height: 72px; /* Matching gc-hour-cell height */
  border-bottom: 1px solid #e8eaed;
  position: relative;
  box-sizing: border-box;
}

.gc-slot-click-zone {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.gc-slot-click-zone:hover {
  background: rgba(26, 115, 232, 0.04);
}

/* Google Calendar Style Events (Pastel blocks) */
.gc-event {
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60,64,67,0.15);
  box-sizing: border-box;
  cursor: not-allowed;
  user-select: none;
}

.gc-event__title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-event__time {
  opacity: 0.8;
  font-size: 9.5px;
}

/* Pastel Colors per column to make it visually attractive and like Google Calendar */
.gc-event--color-0 {
  background: #d2e3fc; /* Soft Blue */
  color: #185abc;
  border-left: 4px solid #1a73e8;
}

.gc-event--color-1 {
  background: #e6f4ea; /* Soft Green */
  color: #137333;
  border-left: 4px solid #0f9d58;
}

.gc-event--color-2 {
  background: #fef7e0; /* Soft Yellow */
  color: #b06000;
  border-left: 4px solid #f4b400;
}

.gc-event--color-3 {
  background: #f3e5f5; /* Soft Purple */
  color: #7b1fa2;
  border-left: 4px solid #ab47bc;
}

.gc-event-flex-avatars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(26, 115, 232, 0.02);
}

.gc-event-flex-avatars:hover {
  background: rgba(26, 115, 232, 0.06);
}

.gc-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  margin-left: -6px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.gc-mini-avatar:first-child {
  margin-left: 0;
}

/* Empty state styling */
.gc-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #ffffff;
  z-index: 5;
  color: #5f6368;
}

.gc-empty-state__icon {
  font-size: 48px;
  color: #dadce0;
}

/* ── SIDEBAR DERECHO (48px) ── */
.gc-right-sidebar {
  width: 48px;
  border-left: 1px solid #dadce0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.gc-right-sidebar__icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.gc-right-sidebar__btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s;
}

.gc-right-sidebar__btn:hover {
  background: #f1f3f4;
}

.gc-right-sidebar__btn img {
  width: 20px;
  height: 20px;
}

.gc-right-sidebar__divider {
  width: 20px;
  height: 1px;
  background: #dadce0;
  margin: 4px 0;
}

.gc-right-sidebar__btn--plus {
  color: #5f6368;
}

.gc-right-sidebar__btn--plus span {
  font-size: 20px;
}

.gc-right-sidebar__btn--chevron {
  color: #5f6368;
}

.gc-right-sidebar__btn--chevron span {
  font-size: 18px;
}

/* ── INTERACTIVE EVENT CREATION POPUP ── */
.gc-popup-card {
  position: absolute;
  top: -45px;
  left: 20px;
  width: 280px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border: 1px solid #dadce0;
}

.gc-popup-card__header {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 12px;
  background: #f1f3f4;
  border-bottom: 1px solid #dadce0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.gc-popup-card__drag {
  font-size: 18px;
  color: #70757a;
  cursor: move;
}

.gc-popup-card__close-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  color: #5f6368;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-popup-card__close-btn:hover {
  background: #dadce0;
}

.gc-popup-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gc-popup-card__title {
  font-size: 16px;
  font-weight: 500;
  color: #202124;
  margin: 0 0 4px;
  font-family: 'Google Sans', Roboto, sans-serif;
}

.gc-popup-card__row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
  color: #3c4043;
}

.gc-popup-card__icon {
  font-size: 18px;
  color: #5f6368;
}

.gc-popup-card__details {
  display: flex;
  flex-direction: column;
}

.gc-popup-card__time {
  font-size: 11.5px;
  color: #70757a;
}

.gc-popup-card__tag {
  background: #e8eaed;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  color: #3c4043;
}

.gc-popup-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid #f1f3f4;
}

.gc-popup-btn-secondary {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
}

.gc-popup-btn-secondary:hover {
  background: rgba(26, 115, 232, 0.04);
}

.gc-popup-btn-primary {
  background: #1a73e8;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.gc-popup-btn-primary:hover {
  background: #185abc;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15);
}