/* Perch - Mobile-First Workspace Booking App */
/* Base: 375px width */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2D5A4A;
  --primary-light: #4A7C6B;
  --primary-dark: #1E3D32;
  --accent: #F5A623;
  --accent-light: #FFD93D;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-light: #999999;
  --border: #E5E5E5;
  --success: #34C759;
  --error: #FF3B30;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Container for centered content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .page {
    padding: 24px 32px;
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 32px 48px;
  }
}

/* Typography */
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Layout */
.page {
  min-height: 100vh;
  padding: 16px;
  padding-bottom: 32px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 8px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.back-btn:active {
  transform: scale(0.95);
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:active {
  background: var(--border);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

/* Form Elements */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: var(--card);
  transition: border-color 0.2s;
}

select.input {
  padding-right: 52px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 24px center;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-icon {
  position: relative;
}

.input-icon .input {
  padding-left: 44px;
}

.input-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Tags/Badges */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.tag-success {
  background: #E8F9ED;
  color: var(--success);
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

/* Utility */
.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Rating Stars */
.stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
}

/* Price */
.price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-light);
}

/* Amenity Icons */
.amenity-icons {
  display: flex;
  gap: 8px;
}

.amenity-icon {
  width: 32px;
  height: 32px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.time-slot {
  padding: 12px 8px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--primary-light);
}

.time-slot.selected {
  background: var(--primary);
  color: white;
}

.time-slot.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.time-slot .slot-time {
  font-size: 14px;
  font-weight: 600;
}

.time-slot .slot-price {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Gallery */
.gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-img {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

/* Reviews */
.review {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.review:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.review-meta {
  flex: 1;
}

.review-name {
  font-weight: 600;
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: var(--text-light);
}

.review-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* QR Code */
.qr-container {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.qr-code {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Booking Reference */
.booking-ref {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
}

/* Info Row */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}

.info-row svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-row-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.info-row-content p {
  font-size: 13px;
}

/* Navigation Links */
a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}
