/* WCQO Funeral Checkout - 獨立喪禮結帳頁面 */
.wcqo-funeral-app { max-width: 800px; margin: 0 auto; padding: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.wcqo-cg2-section { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.wcqo-cg2-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: #333; }
.wcqo-cg2-label { font-size: 14px; font-weight: 600; color: #222; margin-bottom: 8px; display: block; }
.wcqo-cg2-step { margin-bottom: 16px; }
.wcqo-cg2-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; box-sizing: border-box; transition: border-color 0.2s; }
.wcqo-cg2-input:focus { border-color: #8B0000; outline: none; box-shadow: 0 0 0 2px rgba(139,0,0,0.1); }
textarea.wcqo-cg2-input { resize: vertical; }
.wcqo-cg2-field { margin-bottom: 14px; }
.wcqo-cg2-field label { display: block; font-size: 13px; font-weight: 600; color: #222; margin-bottom: 4px; }
.wcqo-cg2-field .req { color: #c00; }
.wcqo-cg2-hint { font-size: 12px; color: #888; margin: -8px 0 12px; }

/* Type buttons */
.wcqo-cg2-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wcqo-cg2-type-btn { padding: 12px; border: 2px solid #ddd; border-radius: 8px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; }
.wcqo-cg2-type-btn:hover { border-color: #8B0000; }
.wcqo-cg2-type-btn.active { border-color: #8B0000; background: #8B0000; color: #fff; }

/* Summary */
.wcqo-cg2-summary { background: #f8f8f0; border: 1px solid #e0dcc0; border-radius: 8px; padding: 12px; font-size: 15px; text-align: center; }

/* Buttons */
.wcqo-cg2-btn-primary { display: block; width: 100%; padding: 14px; background: #8B0000; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 12px; }
.wcqo-cg2-btn-primary:hover { background: #6d0000; }
.wcqo-cg2-btn-secondary { display: block; width: 100%; padding: 12px; background: #fff; color: #8B0000; border: 2px solid #8B0000; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 12px; }
.wcqo-cg2-btn-secondary:hover { background: #fff5f5; }
.wcqo-cg2-btn-submit { display: block; width: 100%; padding: 16px; background: #28a745; color: #fff; border: none; border-radius: 10px; font-size: 18px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.wcqo-cg2-btn-submit:hover { background: #218838; }
.wcqo-cg2-btn-submit:disabled { background: #999; cursor: not-allowed; }

/* Cart */
.wcqo-cg2-cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; margin-bottom: 8px; }
.wcqo-cg2-cart-item-info { font-size: 14px; }
.wcqo-cg2-cart-remove { background: none; border: none; color: #c00; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.wcqo-cg2-cart-total { text-align: right; font-size: 16px; padding: 8px 0; border-top: 2px solid #8B0000; margin-top: 8px; }

/* Upload box */
.wcqo-cg2-upload-box { border: 2px dashed #ccc; border-radius: 12px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s; color: #999; }
.wcqo-cg2-upload-box:hover, .wcqo-cg2-upload-box.drag-over { border-color: #8B0000; background: #fff5f5; }
.wcqo-cg2-upload-box svg { stroke: #999; margin-bottom: 8px; }
.wcqo-cg2-upload-box p { margin: 0; font-size: 14px; }
.wcqo-cg2-upload-box p.file-name { color: #333; font-weight: 600; }

/* OCR */
.wcqo-cg2-loading { text-align: center; padding: 16px; }
.wcqo-cg2-loading .spinner { width: 32px; height: 32px; border: 3px solid #eee; border-top-color: #8B0000; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wcqo-cg2-error { background: #ffe0e0; color: #c00; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-top: 10px; }
.wcqo-cg2-obit-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wcqo-cg2-obit-thumb { width: 120px; height: auto; border-radius: 6px; border: 1px solid #ddd; }
.wcqo-cg2-ocr-summary-box { background: #f0f8f0; border: 1px solid #c0dcc0; border-radius: 8px; padding: 12px; font-size: 14px; margin-top: 12px; }

/* Inscriptions */
.wcqo-cg2-insc-group-title { font-size: 15px; font-weight: 700; margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 2px solid #8B0000; }
.wcqo-cg2-insc-card { background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.wcqo-cg2-insc-pair-label { font-size: 13px; font-weight: 600; color: #8B0000; margin-bottom: 8px; }
.wcqo-cg2-insc-row { display: flex; gap: 8px; margin-bottom: 8px; }
.wcqo-cg2-insc-half { flex: 1; }
.wcqo-cg2-insc-half label, .wcqo-cg2-insc-field label { font-size: 12px; color: #222; display: block; margin-bottom: 2px; }
.wcqo-cg2-insc-field { margin-bottom: 6px; }

/* Address selector */
.wcqo-cg2-address-selector { margin-top: 12px; padding: 12px; background: #f8f8ff; border: 1px solid #dde; border-radius: 8px; }
.wcqo-cg2-radio { display: block; padding: 6px 0; font-size: 14px; cursor: pointer; }
.wcqo-cg2-radio input { margin-right: 6px; }

/* Venue alerts */
.wcqo-cg2-alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-top: 8px; }
.wcqo-cg2-alert-warning { background: #fff8e0; border: 1px solid #f0d860; }
.wcqo-cg2-alert-danger { background: #ffe0e0; border: 1px solid #f0a0a0; }
.wcqo-cg2-alert-info { background: #e8f4ff; border: 1px solid #a0c8f0; }

/* Preview */
#wcqo-cg2-preview-content { font-size: 14px; line-height: 1.8; }

/* Recommended */
.wcqo-cg2-rec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.wcqo-cg2-rec-item { cursor: pointer; border: 2px solid #eee; border-radius: 8px; overflow: hidden; transition: all 0.2s; min-width: 0; }
.wcqo-cg2-rec-item:hover { border-color: #8B0000; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.wcqo-cg2-rec-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; max-width: 100%; }
.wcqo-cg2-rec-price { text-align: center; padding: 6px; font-size: 14px; font-weight: 700; color: #8B0000; }

/* Success */
.wcqo-cg2-success { text-align: center; padding: 40px 20px; }
.wcqo-cg2-success-icon { font-size: 64px; margin-bottom: 16px; }
.wcqo-cg2-success h2 { color: #28a745; margin-bottom: 12px; }

/* Mobile */
@media (max-width: 480px) {
    .wcqo-funeral-app { padding: 8px; }
    .wcqo-cg2-section { padding: 14px; }
    .wcqo-cg2-types { grid-template-columns: repeat(2, 1fr); }
    .wcqo-cg2-rec-grid { grid-template-columns: repeat(2, 1fr); }
    .wcqo-cg2-insc-row { flex-direction: column; gap: 6px; }
}
/* Recommended item active + name */
.wcqo-cg2-rec-item.active { border-color: #8B0000; background: #fff5f5; }
.wcqo-cg2-rec-name { text-align: center; padding: 0 6px; font-size: 12px; color: #666; line-height: 1.3; }

/* Flower photos slider */
.wcqo-cg2-photo-row { margin-bottom:16px; }
.wcqo-cg2-photo-row-title { font-size:14px; font-weight:700; color:#555; margin:0 0 8px; padding-left:4px; }
.wcqo-cg2-slider-wrap { position:relative; overflow:hidden; }
.wcqo-cg2-slider { display:flex; gap:10px; overflow-x:auto; scroll-behavior:smooth; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding:4px 0; }
.wcqo-cg2-slider::-webkit-scrollbar { display:none; }
.wcqo-cg2-slider-item { flex:0 0 auto; width:160px; border:1px solid #eee; border-radius:10px; overflow:hidden; background:#fff; transition:transform 0.2s, box-shadow 0.2s; }
.wcqo-cg2-slider-item:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.wcqo-cg2-slider-item img { width:100%; aspect-ratio:1; object-fit:cover; display:block; cursor:pointer; }
.wcqo-cg2-slider-item .caption { font-size:11px; color:#666; padding:6px 8px; text-align:center; line-height:1.3; }
.wcqo-cg2-slider-item .caption .price { color:#8B0000; font-weight:700; font-size:13px; }
.wcqo-cg2-slider-btn { position:absolute; top:50%; transform:translateY(-60%); width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.9); border:1px solid #ddd; font-size:18px; cursor:pointer; z-index:2; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(0,0,0,0.1); }
.wcqo-cg2-slider-btn:hover { background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.15); }
.wcqo-cg2-slider-btn.prev { left:4px; }
.wcqo-cg2-slider-btn.next { right:4px; }
@media (max-width:480px) { .wcqo-cg2-slider-item { width:140px; } }

/* Flower Card Inline Preview */
.wcqo-fc-inline-preview {
    margin-top: 12px;
    padding: 12px;
    background: #fdf8f8;
    border: 1px solid #f0d0d0;
    border-radius: 8px;
}
.wcqo-fc-inline-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.wcqo-fc-inline-preview-header span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.wcqo-fc-confirm-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.wcqo-fc-confirm-btn:hover { background: #43A047; }
.wcqo-fc-expand-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}
.wcqo-fc-expand-btn:hover { background: #eee; }
.wcqo-fc-disclaimer {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 6px;
    margin-bottom: 0;
}
.wcqo-fc-inline-preview-body {
    text-align: center;
}

/* Placeholder text - lighter color to distinguish from filled content */
.wcqo-cg2-input::placeholder,
.wcqo-p-input::placeholder,
.wcqo-input::placeholder,
input.wcqo-cg2-input::placeholder,
input.wcqo-p-input::placeholder,
textarea::placeholder {
  color: #b0b0b0 !important;
  opacity: 1;
  font-style: italic;
}

/* Purpose buttons - refined style */
.wcqo-cg2-purpose-btn {
  padding: 10px 20px;
  border: 1.5px solid #d4d0c8;
  border-radius: 20px;
  background: #fafaf7;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #555;
  letter-spacing: 1px;
}
.wcqo-cg2-purpose-btn:hover {
  border-color: #8B0000;
  color: #8B0000;
  background: #fff;
}
.wcqo-cg2-purpose-btn.active {
  border-color: #8B0000;
  background: #8B0000;
  color: #fff;
  box-shadow: 0 2px 8px rgba(139,0,0,0.2);
}

/* Type buttons - pill style */
.wcqo-cg2-type-btn {
  border-radius: 20px !important;
  padding: 10px 18px !important;
  border-width: 1.5px !important;
  font-size: 13px !important;
  letter-spacing: 0.5px;
}

/* Section titles - clean */
.wcqo-cg2-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border-left: 3px solid #8B0000;
  padding-left: 10px;
  margin-bottom: 12px;
}

/* Date picker fix for Woodmart theme */
#wcqo-cg2-event-date::-webkit-calendar-picker-indicator,
#wcqo-cg2-delivery-date::-webkit-calendar-picker-indicator {
    opacity: 1 !important;
    cursor: pointer;
}


/* Basket photo grid - 3-col desktop, 2-col mobile */
.wcqo-basket-photos { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 480px) { .wcqo-basket-photos { grid-template-columns: repeat(2, 1fr) !important; } }
.wcqo-rec-photos img { cursor: pointer; transition: opacity 0.2s; }
.wcqo-rec-photos img:hover { opacity: 0.85; }

/* Lightbox */
#wcqo-cg2-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#wcqo-cg2-lightbox.active { display: flex; }
#wcqo-cg2-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#wcqo-cg2-lightbox-caption {
    display: none;
    position: absolute;
    bottom: 28px;
    left: 0; right: 0;
    text-align: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
#wcqo-cg2-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.85;
    user-select: none;
}
#wcqo-cg2-lightbox-close:hover { opacity: 1; }

/* Note toggle button hover */
#wcqo-cg2-note-toggle:hover { background: #bbdefb !important; border-style: solid !important; }
#wcqo-cg2-note-toggle.open { background: #e3f2fd !important; border-style: solid !important; border-color: #1565c0 !important; color: #0d47a1 !important; }
