/* ============================================================
   Google Calendar - Event share page (recreated)
   ============================================================ */

:root {
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #1f1f1f;
  --text-strong: #202124;
  --text-muted: #444746;
  --text-secondary: #5f6368;
  --blue: #0b57d0;
  --blue-hover: #0842a0;
  --border: #dadce0;
  --divider: #e8eaed;
  --green: #188038;
  --hover: #f1f3f4;
  --surface-container: #eef0f3;   /* nền xám thanh RSVP (giống bản gốc) */
  --radius: 28px;
  --font: "Google Sans Text", "Google Sans", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.page {
  max-width: 828px;
  margin: 0 auto;
  padding: 24px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------- Thẻ sự kiện ---------------------- */
.event-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60, 64, 67, .16), 0 4px 12px rgba(60, 64, 67, .08);
  /* Thẻ trắng cao gần full màn hình -> kéo dài xuống sau thanh xám (giống bản gốc) */
  min-height: calc(100vh - 24px);
  min-height: calc(100dvh - 24px);
}

.event-banner {
  background: #dcf1ff;
  line-height: 0;
}
.event-banner img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.event-body {
  padding: 24px 30px 220px;   /* chừa đáy để footer không bị thanh xám che */
}

.event-title {
  font-family: "Google Sans", var(--font);
  font-size: 31px;
  font-weight: 400;
  line-height: 40px;
  color: var(--text-strong);
  margin: 0 0 4px;
  word-break: break-word;
}

.event-date {
  font-size: 17px;
  line-height: 26px;
  color: var(--text-muted);
  margin: 0 0 22px;
}

/* ---------------------- Hàng thông tin ---------------------- */
.row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 13px 0;
}

.row-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.row-icon svg { display: block; }

.row-body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  padding-top: 2px;
}

/* Link row (địa điểm) */
.row-link {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background .15s ease;
}
.row-link:hover { background: var(--hover); }
.loc-title { color: var(--text); font-weight: 500; }
.loc-sub { color: var(--text-secondary); font-size: 15px; }

/* Ghi chú */
.notes p { margin: 0 0 12px; }
.notes p:last-child { margin-bottom: 0; }
.notes strong { color: var(--text-strong); font-weight: 500; }

/* ---------------------- Nút Google Meet ---------------------- */
.meet-btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background .15s ease;
}
.meet-btn:hover { background: rgba(60, 64, 67, .04); }
.meet-btn-main {
  display: block;
  font-family: "Google Sans Text", var(--font);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);      /* chữ đen như bản gốc */
  text-decoration: none;
}
/* Chỉ gạch chân khi rê chuột / bấm vào (giống web chính) */
.meet-btn:hover .meet-btn-main,
.meet-btn:focus-visible .meet-btn-main,
.meet-btn:active .meet-btn-main,
.meet-btn:hover .meet-btn-sub,
.meet-btn:focus-visible .meet-btn-sub,
.meet-btn:active .meet-btn-sub {
  text-decoration: underline;
}
.meet-btn-sub {
  display: block;
  font-size: 15px;
  line-height: 21px;
  color: var(--text-secondary);
}

/* ---------------------- Khách mời ---------------------- */
.guests-count { font-size: 17px; color: var(--text); }
.guests-sub { font-size: 15px; color: var(--text-secondary); }

.guest-list {
  list-style: none;
  margin: 10px 0 4px;
  padding: 0 0 0 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.guest {
  display: flex;
  align-items: center;
  gap: 12px;
}
.guest-avatar {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  font-family: "Google Sans", var(--font);
  text-transform: uppercase;
}
/* Huy hiệu "đồng ý tham gia" */
.guest-avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ceead6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath fill='none' stroke='%23137333' stroke-width='1.5' d='M3.5 6.5L6 9l5-5'/%3E%3C/svg%3E") center/12px no-repeat;
  border: 2px solid var(--card-bg);
  box-sizing: content-box;
}
.guest-avatar.no-badge::after { display: none; }
.guest-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.guest-info { min-width: 0; }
.guest-name {
  font-size: 17px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guest-role { font-size: 15px; color: var(--text-secondary); }

/* ---------------------- Footer thẻ ---------------------- */
.event-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;      /* căn giữa như mẫu */
}
.event-footer a { color: var(--blue); text-decoration: none; }
.event-footer a:hover { text-decoration: underline; }

/* ============================================================
   RSVP
   ============================================================ */
.rsvp {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 10;
  background: var(--surface-container);
  border-radius: 0;
  /* nội dung giới hạn và căn giữa như bản gốc */
  padding: 48px max(20px, calc(50% - 390px)) 28px;   /* cao hơn: chữ "Tham dự?" nhích lên */
  max-height: 82vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 -1px 3px rgba(60, 64, 67, .1), 0 -4px 12px rgba(60, 64, 67, .06);
}

.rsvp-title {
  font-family: "Google Sans", var(--font);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-strong);
  margin: 0 0 18px;
  text-align: center;
}

.rsvp-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.rsvp-btn {
  flex: 0 0 auto;
  min-width: 68px;
  font-family: "Google Sans", var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);       /* chữ đen */
  background: transparent;   /* ăn theo nền xám của thanh RSVP */
  border: 1px solid var(--text);   /* viền đen */
  border-radius: 100px;
  padding: 9px 24px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rsvp-btn:hover { background: rgba(11, 87, 208, .06); }
.rsvp-btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.rsvp-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 18px 0 0;
}

.rsvp-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text);
}
.account-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
}
.account-email { flex: 0 0 auto; }
.icon-btn {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--hover); }

/* Form phản hồi */
.rsvp-form { margin: 16px auto 0; max-width: 520px; text-align: left; }
.field { display: block; position: relative; }
.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.field input {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}
.field-hint {
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.rsvp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.text-btn, .filled-btn {
  font-family: "Google Sans", var(--font);
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  padding: 9px 24px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, box-shadow .15s ease;
}
.text-btn { background: transparent; color: var(--blue); }
.text-btn:hover { background: rgba(11, 87, 208, .06); }
.filled-btn { background: var(--blue); color: #fff; }
.filled-btn:hover {
  background: var(--blue-hover);
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

.rsvp-done {
  margin: 16px auto 0;
  max-width: 520px;
  padding: 12px 16px;
  background: #e6f4ea;
  color: var(--green);
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
}

/* ---------------------- Responsive ---------------------- */
@media (max-width: 860px) {
  .page { padding: 0; gap: 0; }
  .event-card {
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .event-body { padding: 22px 18px 200px; }
  .event-title { font-size: 28px; line-height: 36px; }
  /* Thanh RSVP: bo góc trên, full width như bản gốc trên mobile */
  .rsvp {
    border-radius: 28px 28px 0 0;
    padding: 40px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
}
