
/* YourNode Reservations - Premium Frontend */

/* --- Variables & Base --- */
:root {
  --ynr-primary: #f6e9d8;
  --ynr-primary-hover: #ecd9c4;
  --ynr-text-on-primary: #10314f;
  --ynr-text-dark: #10314f;
  --ynr-text-gray: #4b5563;
  --ynr-text-light: #9ca3af;
  --ynr-bg-light: #f8f9fa;
  --ynr-border: #eaecf0;
  --ynr-radius: 8px;
}

.ynr-booking, .ynr-service-card {
  font-family: inherit;
  color: var(--ynr-text-gray);
  box-sizing: border-box;
}

.ynr-booking *, .ynr-service-card * {
  box-sizing: border-box;
}

/* --- Booking Container --- */
.ynr-booking {
  background: #ffffff;
  border: 1px solid var(--ynr-border);
  border-radius: var(--ynr-radius);
  max-width: 850px;
  margin: 0 auto;
  box-shadow: none; /* No shadow */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ynr-booking.has-image {
  flex-direction: row;
}

.ynr-booking-image {
  width: 100%;
  height: 200px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  margin: 20px 0 0 20px;
}

.ynr-booking.has-image .ynr-booking-image {
  width: 30%;
  height: auto;
  min-height: 300px;
  margin: 32px 0 32px 32px;
}

.ynr-booking-content {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ynr-booking h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--ynr-text-dark);
  letter-spacing: -0.025em;
}

@media (max-width: 1024px) {
  .ynr-booking.has-image { flex-direction: column; }
  .ynr-booking.has-image .ynr-booking-image { width: 100%; height: 300px; min-height: 0; }
  .ynr-booking-content { padding: 32px; }
}

/* --- Form Elements --- */
.ynr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.ynr-row.full {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .ynr-row { grid-template-columns: 1fr; gap: 16px; }
}

.ynr-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ynr-text-dark);
}

.ynr-field input, 
.ynr-field select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--ynr-border);
  border-radius: var(--ynr-radius);
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  background-color: var(--ynr-bg-light);
  color: var(--ynr-text-dark);
  min-height: 48px;
}

.ynr-field input:focus, 
.ynr-field select:focus {
  outline: none;
  border-color: var(--ynr-primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

/* --- Add-ons Section (New) --- */
.ynr-addons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.ynr-addon-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--ynr-border);
    border-radius: 8px;
    background: var(--ynr-bg-light);
    cursor: pointer;
    transition: all 0.2s;
}

.ynr-addon-item:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.ynr-addon-item input {
    width: auto !important;
    min-height: 0 !important;
    margin-right: 10px;
}

.ynr-addon-label {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ynr-text-dark);
}

.ynr-addon-price {
    font-size: 0.9rem;
    color: var(--ynr-text-dark);
    font-weight: 700;
}

/* --- Slots Grid --- */
.ynr-slots {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.ynr-slot {
  border: 1px solid var(--ynr-border);
  border-radius: var(--ynr-radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}

.ynr-slot:hover:not([aria-disabled="true"]) {
  border-color: var(--ynr-primary);
  background-color: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ynr-slot.is-selected {
  background-color: var(--ynr-primary);
  border-color: var(--ynr-primary);
  color: var(--ynr-text-on-primary);
  box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.1);
}

.ynr-slot.is-selected .ynr-small { color: var(--ynr-text-on-primary); opacity: 0.8; }
.ynr-slot.is-selected .ynr-badge { background: rgba(0,0,0,0.1); color: var(--ynr-text-on-primary); }

.ynr-slot[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f3f4f6;
  border-color: transparent;
}

.ynr-slot strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.ynr-small { font-size: 0.75rem; color: #6b7280; }

.ynr-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Daily Status --- */
.ynr-daily-status {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--ynr-radius);
  border: 1px solid var(--ynr-border);
  background: var(--ynr-bg-light);
  text-align: center;
}
.ynr-daily-status.available {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.ynr-daily-status.unavailable {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.ynr-daily-status strong { display: block; font-size: 1.25rem; margin-bottom: 8px; }

/* --- Summary (Conversion Optimized) --- */
.ynr-summary {
  margin: 32px 0;
  padding: 24px;
  background: #f8fafc;
  border-radius: var(--ynr-radius);
  border: 1px dashed #cbd5e1;
}

.ynr-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--ynr-text-dark);
}

/* Highlight the actual rental cost */
.ynr-summary-row.is-highlight {
    align-items: baseline;
    margin-bottom: 12px;
}

.ynr-summary-row.is-highlight span:first-child {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ynr-text-dark);
}

.ynr-subtotal {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--ynr-text-dark);
}

.ynr-summary-row.is-muted {
  font-size: 0.9rem;
  color: var(--ynr-text-gray);
}

.ynr-summary-divider {
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

/* Final Row */
.ynr-summary-final {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align top because left side has stack */
}

.ynr-final-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ynr-text-dark);
    margin-bottom: 4px;
}

.ynr-total-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ynr-text-dark);
  line-height: 1;
}

/* Trust Badge (Green text) */
.ynr-pay-later-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #166534; /* Green 700 */
    font-weight: 600;
    background: #dcfce7; /* Green 100 */
    padding: 4px 10px;
    border-radius: 99px;
}

/* --- Messages --- */
.ynr-msg {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--ynr-radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}
.ynr-msg.ynr-ok { background: #ecfdf5; color: #065f46; border: 1px solid #d1fae5; }
.ynr-msg.ynr-err { background: #fef2f2; color: #991b1b; border: 1px solid #fee2e2; }

/* --- Button --- */
.ynr-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 24px;
  background-color: var(--ynr-primary);
  color: #10314f !important;
  font-weight: 700;
  border-radius: 10px !important;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  letter-spacing: 0.025em;
  margin-top: 16px;
  box-shadow: none;
  text-decoration: none;
}

.ynr-btn:hover:not(:disabled) { 
  background-color: var(--ynr-primary-hover); 
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  color: #10314f !important;
}
.ynr-btn:active { transform: translateY(0); }
.ynr-btn:disabled { background-color: #a5b4fc; cursor: not-allowed; box-shadow: none; transform: none; }

/* --- Powered By Footer --- */
.ynr-powered-by {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
}

.ynr-powered-by a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
  transition: opacity 0.2s;
  opacity: 0.7;
}

.ynr-powered-by a:hover {
  opacity: 1;
}

.ynr-powered-by img {
  height: 18px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.2s;
}

.ynr-powered-by a:hover img {
  filter: grayscale(0%);
}

/* --- Modern Services Archive Grid --- */

.ynr-services-wrap {
    margin-bottom: 40px;
}

.ynr-services { 
    display: grid; 
    gap: 32px; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Better Responsive Grid */
}

/* List view override (if used) */
.ynr-services.list { 
    grid-template-columns: 1fr; 
}

.ynr-service-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  height: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
}

.ynr-service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Thumbnail Area */
.ynr-service-thumb {
  position: relative;
  overflow: hidden;
  padding-top: 65%; /* Taller Image */
  background-color: #f3f4f6;
  display: block;
}

.ynr-service-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.ynr-service-card:hover .ynr-service-thumb img {
  transform: scale(1.08);
}

/* Type Badge overlay on image */
.ynr-service-thumb::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 40%);
    opacity: 0.6;
}

/* Content Body */
.ynr-service-body { 
  padding: 24px; 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.ynr-service-body h3 { 
  font-size: 1.35rem; 
  font-weight: 700; 
  margin: 0 0 12px; 
  color: var(--ynr-text-dark); 
  line-height: 1.3;
}

.ynr-service-excerpt {
  color: var(--ynr-text-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
  opacity: 0.9;
}

/* Meta Footer in Card */
.ynr-service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

.ynr-price-from {
  font-size: 0.85rem;
  color: var(--ynr-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ynr-price-from strong {
  display: block;
  font-size: 1.5rem;
  color: var(--ynr-text-dark);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 4px;
}

/* Specific button style for cards */
.ynr-service-meta .ynr-btn {
    width: auto;
    margin: 0;
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 10px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Search Filter */
.ynr-filter input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--ynr-border);
  border-radius: 99px;
  margin-bottom: 40px;
  font-size: 1.1rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
  transition: all 0.2s;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat right 20px center;
}

.ynr-filter input:focus {
    outline: none;
    border-color: var(--ynr-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Live Inventory Card Specifics --- */
.ynr-live-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 99px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}
.ynr-live-badge.is-red { color: #ef4444; }

.ynr-stock-visual {
    margin-bottom: 12px;
}

.ynr-stock-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ynr-stock-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease;
}

.ynr-stock-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Mobile Specific Adjustments */
@media (max-width: 640px) {
    .ynr-services {
        grid-template-columns: 1fr; /* Force single column */
        gap: 20px;
    }
    
    .ynr-service-thumb {
        padding-top: 60%;
    }
    
    .ynr-service-body {
        padding: 20px;
    }
    
    .ynr-service-meta {
        align-items: center;
    }
    
    .ynr-price-from strong {
        font-size: 1.3rem;
    }
}

/* --- Modal --- */
.ynr-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Instead of pure opacity, we just use display:none set inline by JS, and fadeIn/fadeOut */
}

.ynr-modal-content {
  background: #fff;
  border-radius: var(--ynr-radius);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: ynr-modal-in 0.3s ease;
}

@keyframes ynr-modal-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ynr-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.05);
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ynr-text-gray);
  transition: background 0.2s;
}

.ynr-modal-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--ynr-text-dark);
}

.ynr-modal-content .ynr-booking {
    border: none;
    box-shadow: none;
    margin: 0;
    max-width: none;
}
