/* ── WishCraft Frontend Styles ──────────────────────────────────────── */
.wishcraft-container { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 1000px; margin: 0 auto; padding: 20px; }
.wc-step { display: none; }
.wc-step.active { display: block; animation: wcFadeIn .3s ease; }
@keyframes wcFadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* Header */
.wc-step-header { text-align: center; padding: 30px 20px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-radius: 20px; margin-bottom: 24px; }
.wc-logo { font-size: 22px; font-weight: 800; margin-bottom: 8px; letter-spacing: 1px; }
.wc-step-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.wc-step-header p { opacity: .85; font-size: 14px; }

/* Form */
.wc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
@media(max-width:640px) { .wc-form-grid { grid-template-columns: 1fr; } }
.wc-field label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 8px; }
.wc-input { width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 15px; transition: border-color .2s; outline: none; background: #fff; }
.wc-input:focus { border-color: #667eea; }

/* Pills */
.wc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.wc-pill { padding: 8px 14px; border-radius: 20px; background: #f5f5f5; border: 2px solid transparent; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; color: #444; user-select: none; }
.wc-pill:hover { background: #ede7f6; border-color: #9c27b0; }
.wc-pill.selected { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-color: transparent; }

/* Buttons */
.wc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; }
.wc-btn:disabled { opacity: .6; cursor: not-allowed; }
.wc-btn-primary { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; }
.wc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102,126,234,.4); }
.wc-btn-lg { width: 100%; justify-content: center; padding: 16px; font-size: 16px; border-radius: 14px; }
.wc-btn-secondary { background: #f0f0f0; color: #333; }
.wc-btn-secondary:hover { background: #e0e0e0; }
.wc-btn-ghost { background: transparent; color: #666; border: 2px solid #ddd; }
.wc-btn-ghost:hover { border-color: #999; color: #333; }
.wc-btn-whatsapp { background: #25d366; color: #fff; }
.wc-btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,.35); }

/* Step 2 layout */
.wc-template-viewer { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
@media(max-width:768px) { .wc-template-viewer { grid-template-columns: 1fr; } }

/* Preview panel */
.wc-preview-panel { display: flex; flex-direction: column; gap: 14px; }
.wc-preview-label { font-size: 13px; font-weight: 600; color: #666; }
.wc-preview-box { border-radius: 16px; overflow: hidden; border: 2px dashed #ddd; min-height: 280px; display: flex; align-items: center; justify-content: center; transition: all .3s; background: #fafafa; }
.wc-preview-box.has-content { border: none; }
.wc-preview-placeholder { color: #bbb; font-size: 14px; }
.wc-preview-box .wc-template { border-radius: 0 !important; width: 100%; }

/* Wish message */
.wc-wish-message-box label { font-size: 13px; font-weight: 600; color: #444; display: block; margin-bottom: 8px; }
.wc-textarea { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 14px; font-family: inherit; line-height: 1.6; resize: vertical; outline: none; transition: border-color .2s; }
.wc-textarea:focus { border-color: #667eea; }

/* Action buttons */
.wc-action-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.wc-action-buttons .wc-btn { flex: 1; justify-content: center; font-size: 14px; }

/* Template grid */
.wc-templates-panel { display: flex; flex-direction: column; }
.wc-templates-header { font-size: 13px; font-weight: 600; color: #666; margin-bottom: 10px; }
.wc-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-height: 640px; overflow-y: auto; padding: 4px 4px 4px 2px; }
.wc-template-card { border: 2px solid #e0e0e0; border-radius: 16px; overflow: hidden; cursor: pointer; transition: all .2s; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.07); display: flex; flex-direction: column; }
.wc-template-card:hover { border-color: #9c27b0; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.13); }
.wc-template-card.selected { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.3); }
.wc-template-mini-wrap { width: 100%; height: 130px; overflow: hidden; pointer-events: none; position: relative; }
.wc-color-preview { width: 100%; height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.wc-color-preview-emoji { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.wc-color-preview-recipient { font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; }
.wc-template-name { padding: 9px 10px 10px; font-size: 12px; font-weight: 700; color: #2d2d2d; text-align: center; background: #fff; border-top: 1px solid #eee; line-height: 1.4; min-height: 36px; display: flex; align-items: center; justify-content: center; letter-spacing: 0.1px; }

/* Template occasion badges */
.wc-tpl-badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 8px 6px; min-height: 30px; background: linear-gradient(135deg, #f0f0ff, #f8f8ff); border-bottom: 1px solid #ddd; }
.wc-tpl-badge { font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 10px; background: linear-gradient(135deg, #ede7f6, #d1c4e9); color: #4527a0; border: 1px solid #b39ddb; white-space: nowrap; letter-spacing: 0.2px; }
.wc-tpl-badge-all { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #1b5e20; border-color: #81c784; }

/* States */
.wc-loading, .wc-empty { text-align: center; padding: 40px 20px; color: #888; font-size: 14px; grid-column: 1/-1; }
.wc-empty-emoji { font-size: 40px; display: block; margin-bottom: 10px; }

/* Toast */
.wc-toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 22px; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 600; z-index: 99999; box-shadow: 0 8px 30px rgba(0,0,0,0.2); animation: wcSlideUp .3s ease; }
@keyframes wcSlideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.wc-toast.success { background: #4caf50; }
.wc-toast.error { background: #f44336; }

/* Share Modal */
.wc-share-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; z-index: 99998; padding: 20px; }
.wc-share-modal-box { background: #fff; border-radius: 24px; padding: 36px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.wc-share-modal-box h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: #222; }
.wc-share-modal-box p { color: #666; font-size: 14px; margin-bottom: 16px; }
.wc-share-url { background: #f5f5f5; border-radius: 8px; padding: 10px 14px; font-size: 11px; color: #888; word-break: break-all; margin-bottom: 16px; text-align: left; }
.wc-share-actions { display: flex; flex-direction: column; gap: 10px; }
