.koro-widget {
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fcfdfd 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.koro-widget * {
  box-sizing: border-box;
}

.koro-widget__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 8px;
}

.koro-widget__hero,
.koro-calendar,
.koro-inquiry {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 9px;
}

.koro-widget__hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #fff;
  border: none;
}

.koro-widget__eyebrow {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.6rem;
  margin-bottom: 6px;
}

.koro-widget__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.15;
  font-weight: 800;
}

.koro-widget__subtitle {
  margin: 6px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.koro-message {
  padding: 8px 9px;
  border-radius: 9px;
  margin-bottom: 8px;
  font-size: 0.7rem;
}

.koro-message--loading {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.koro-message--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.koro-message--success,
.koro-message--selection {
  background: #f0fdfa;
  color: #0f172a;
  border: 1px solid #99f6e4;
}

.koro-calendar {
  padding: 9px;
}

.koro-calendar__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.koro-calendar__controls button {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  padding: 6px 7px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
}

.koro-calendar__month {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: capitalize;
}

.koro-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.koro-weekday,
.koro-day {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.koro-weekday {
  padding: 5px 2px;
  text-align: center;
  font-size: 0.5rem;
  color: #64748b;
  background: #f8fafc;
  font-weight: 700;
  text-transform: uppercase;
}

.koro-day {
  min-height: 48px;
  padding: 4px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  overflow: hidden;
}

.koro-day--empty {
  background: #fafafa;
  border-style: dashed;
}

.koro-day--free {
  background: #f8fafc;
  cursor: pointer;
}

.koro-day--busy {
  background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
}

.koro-day--option {
  background: linear-gradient(180deg, #fffdf5 0%, #fef3c7 100%);
}

.koro-day--selected-start,
.koro-day--selected-end {
  outline: 2px solid #0f766e;
  outline-offset: -2px;
}

.koro-day--selected-range {
  background: linear-gradient(180deg, #ecfeff 0%, #cffafe 100%) !important;
  border-color: #67e8f9 !important;
}

.koro-day--turnover-busy,
.koro-day--turnover-option {
  cursor: pointer;
}

.koro-day__halves {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.koro-day__half {
  position: absolute;
  left: 0;
  width: 100%;
}

.koro-day__half--top {
  top: 0;
  height: 50%;
}

.koro-day__half--bottom {
  bottom: 0;
  height: 50%;
}

.koro-day__half--free {
  background: #f8fafc;
}

.koro-day__half--busy {
  background: #fee2e2;
}

.koro-day__half--option {
  background: #fef3c7;
}

.koro-day__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 100%;
}

.koro-day__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}

.koro-day__number {
  font-weight: 800;
  font-size: 0.62rem;
}

.koro-day__today {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0f766e;
  margin-top: 1px;
}

.koro-day__status {
  font-size: 0.42rem;
  display: inline-flex;
  width: fit-content;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.koro-day__meta {
  margin-top: auto;
  font-size: 0.44rem;
  color: #64748b;
  line-height: 1.1;
}

.koro-day--free .koro-day__status { color: #475569; }
.koro-day--busy .koro-day__status { color: #b91c1c; }
.koro-day--option .koro-day__status { color: #b45309; }

.koro-inquiry {
  margin-top: 8px;
}

.koro-inquiry__title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.koro-inquiry__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.koro-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.koro-field--full {
  grid-column: 1 / -1;
}

.koro-field label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #334155;
}

.koro-field input,
.koro-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 8px;
  font: inherit;
  font-size: 0.68rem;
  color: #0f172a;
  background: #fff;
}

.koro-field textarea {
  min-height: 70px;
  resize: vertical;
}

.koro-inquiry__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px;
}

.koro-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.koro-btn--primary {
  background: #0f766e;
  color: #fff;
}

.koro-btn--secondary {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 520px) {
  .koro-inquiry__grid {
    grid-template-columns: 1fr;
  }

  .koro-day__meta {
    display: none;
  }
}
