/* ================================================================
   WC Booking Popup — Frontend Styles
   File: assets/css/wcbp-popup.css
================================================================ */

/* ── Delivery badge (shop loop) ──────────────────────────────── */
.wcbp-delivery-badge,
.wcbp-delivery-timing {
    display: block;
    margin: 4px 0 6px;
    font-size: .82rem;
    line-height: 1.3;
}

/* ── Book Now button ─────────────────────────────────────────── */
button.wcbp-open {
    position: relative !important;
    background-color: #ffffff !important;
    color: #b3821c !important;
    border: 1px solid #b3821c !important;
    border-radius: 0 !important;
    padding: 12px 24px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: .75rem !important;
    text-transform: uppercase !important;
    letter-spacing: .15em !important;
    width: 100% !important;
    margin-top: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    overflow: hidden !important;
}
/* Arrow span — hidden by default, slides in on hover */
button.wcbp-open .wcbp-arrow {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.25s ease, opacity 0.25s ease, margin 0.25s ease;
    margin-left: 0;
    white-space: nowrap;
}
button.wcbp-open:hover {
    background-color: #b3821c !important;
    color: #ffffff !important;
    border-color: #b3821c !important;
    gap: 6px !important;
}
button.wcbp-open:hover .wcbp-arrow {
    max-width: 20px;
    opacity: 1;
    margin-left: 6px;
}

/* ── Overlay ─────────────────────────────────────────────────── */
#wcbp-ov {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.6);
    z-index: 9999999;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

/* ── Modal box ───────────────────────────────────────────────── */
#wcbp-box {
    background: #fff;
    border-radius: 0;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

/* ── Header ──────────────────────────────────────────────────── */
#wcbp-hdr {
    background: #b3821c;
    color: #fff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    flex-shrink: 0;
}
#wcbp-hdr button {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 0;
    width: 32px; height: 32px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
#wcbp-hdr button:hover { background: rgba(255,255,255,.35); }

/* ── Step bar ────────────────────────────────────────────────── */
#wcbp-sbar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #faf7f0;
    border-bottom: 1px solid #ede6d3;
    flex-shrink: 0;
}
.ws  { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wd  { width: 26px; height: 26px; border-radius: 50%; background: #e8dfc8; color: #a08530; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.wl  { font-size: .62rem; font-weight: 600; color: #b0a070; white-space: nowrap; letter-spacing: .04em; transition: color .2s; }
.wln { flex: 1; height: 1px; background: #e0d5b8; margin: 0 6px 16px; }
.ws.on .wd  { background: #b3821c; color: #fff; }
.ws.on .wl  { color: #b3821c; }
.ws.dn .wd  { background: #2e7d32; color: #fff; }
.ws.dn .wl  { color: #2e7d32; }
.ws.skipped .wd { background: #ccc; color: #fff; }
.ws.skipped .wl { color: #ccc; text-decoration: line-through; }

/* ── Panels ──────────────────────────────────────────────────── */
#wcbp-panels { overflow-y: auto; flex: 1; }
.wp         { display: none; padding: 20px 22px 6px; }
.wp.on      { display: block; }
.wph        { font-size: .95rem; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; letter-spacing: .02em; }
.whi        { color: #999; font-size: .8rem; margin: 0 0 12px; }

/* ── Inline calendar ─────────────────────────────────────────── */
#wcbp-cal { margin-bottom: 10px; }
#wcbp-cal .flatpickr-calendar { position: static !important; display: block !important; visibility: visible !important; opacity: 1 !important; box-shadow: none !important; border: 1px solid #e0d5b8 !important; border-radius: 0 !important; width: 100% !important; max-width: 100% !important; }
#wcbp-cal .flatpickr-innerContainer,
#wcbp-cal .flatpickr-rContainer { width: 100% !important; }
#wcbp-cal .flatpickr-days,
#wcbp-cal .dayContainer { width: 100% !important; min-width: 100% !important; max-width: 100% !important; }
#wcbp-cal .flatpickr-day { border-radius: 0 !important; max-width: none !important; flex: 1 !important; height: 36px !important; line-height: 36px !important; font-size: .82rem !important; transition: all .15s !important; }
#wcbp-cal .flatpickr-day.selected,
#wcbp-cal .flatpickr-day.selected:hover { background: #b3821c !important; border-color: #b3821c !important; color: #fff !important; }
#wcbp-cal .flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) { background: #faf0d0 !important; color: #b3821c !important; }
#wcbp-cal .flatpickr-day.today { border-color: #b3821c !important; color: #b3821c !important; font-weight: 700 !important; }
#wcbp-cal .flatpickr-day.flatpickr-disabled { opacity: .3 !important; }
#wcbp-cal .flatpickr-day.wcbp-admin-blocked { background: #fff0f0 !important; border-color: #e74c3c !important; color: #c0392b !important; opacity: 1 !important; cursor: not-allowed !important; font-weight: 700 !important; position: relative !important; overflow: visible !important; }
#wcbp-cal .flatpickr-day.wcbp-admin-blocked:hover { background: #ffe0e0 !important; }
#wcbp-cal .flatpickr-current-month { font-size: .88rem !important; font-weight: 700 !important; color: #1a1a1a !important; letter-spacing: .05em !important; }
#wcbp-cal .flatpickr-weekday { font-size: .7rem !important; font-weight: 700 !important; color: #b3821c !important; background: transparent !important; text-transform: uppercase !important; letter-spacing: .05em !important; }
#wcbp-cal .flatpickr-months { background: #faf7f0 !important; padding: 6px 0 !important; }
#wcbp-cal .flatpickr-prev-month svg,
#wcbp-cal .flatpickr-next-month svg { fill: #b3821c !important; }
.wcbp-admin-blocked { background: #ff0000c7 !important; color: white !important; cursor: not-allowed !important; }

/* ── Date selected tag ───────────────────────────────────────── */
.wdtag { margin-top: 20px; background: #faf0d0; border: 1px solid #b3821c; border-radius: 0; padding: 8px 12px; font-size: .82rem; color: #7a6008; margin-bottom: 8px; display: none; }

/* ── Option buttons (shipping / time) ────────────────────────── */
.wo-list { display: flex; flex-direction: column; gap: 8px; }
.wo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wo      { border: 1px solid #e0d5b8; border-radius: 0; padding: 10px 14px; background: #fff; cursor: pointer; font-size: .85rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; width: 100%; color: #333; text-align: left; transition: all .18s; letter-spacing: .02em; }
.wo:hover { border-color: #b3821c; background: #faf7f0; color: #b3821c; }
.wo.on    { border-color: #b3821c; background: #faf0d0; color: #7a6008; }
.wo-grid .wo { flex: 1 1 calc(33.33% - 6px); justify-content: center; font-size: .78rem; padding: 10px 4px; width: auto; text-align: center; }

/* ── Form fields ─────────────────────────────────────────────── */
.wr { display: flex; gap: 12px; }
.wf { flex: 1; margin-bottom: 12px; }
.wf label { display: block; font-size: .72rem; font-weight: 700; margin-bottom: 5px; color: #555; text-transform: uppercase; letter-spacing: .06em; }
.wf input, .wf textarea { width: 100%; padding: 10px 12px; border: 1px solid #e0d5b8; border-radius: 0; font-size: .9rem; font-family: inherit; box-sizing: border-box; resize: vertical; background: #faf7f0; transition: border-color .15s; }
.wf input:focus, .wf textarea:focus { outline: none; border-color: #b3821c; background: #fff; }

/* ── Summary box ─────────────────────────────────────────────── */
.wsum { background: #faf7f0; border: 1px solid #e0d5b8; border-radius: 0; padding: 10px 14px; margin-bottom: 12px; }
.wsr  { display: flex; justify-content: space-between; font-size: .8rem; padding: 5px 0; border-bottom: 1px solid #ede6d3; color: #777; }
.wsr:last-child { border: none; }
.wsr strong { color: #333; font-weight: 700; }

/* ── Navigation buttons ──────────────────────────────────────── */
.wnav { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 18px; }
.wbk  { padding: 9px 18px; border-radius: 0; font-size: .75rem; font-weight: 600; cursor: pointer; border: 1px solid #ccc; background: #fff; color: #888; text-transform: uppercase; letter-spacing: .08em; transition: all .18s; }
.wbk:hover { border-color: #b3821c; color: #b3821c; }
.wnx  { padding: 10px 24px; border-radius: 0; font-size: .75rem; font-weight: 700; cursor: pointer; border: 1px solid #b3821c; background: #b3821c; color: #fff; text-transform: uppercase; letter-spacing: .1em; transition: all .18s; }
.wnx:hover { background: #9e7e0a; border-color: #9e7e0a; }
#wcbp-pay, #wcbp-confirm { padding: 12px 30px; border-radius: 0; font-size: .8rem; font-weight: 700; cursor: pointer; border: 1px solid #b3821c; background: #b3821c; color: #fff; text-transform: uppercase; letter-spacing: .12em; transition: all .18s; }
#wcbp-pay:hover, #wcbp-confirm:hover { background: #9e7e0a; border-color: #9e7e0a; }
#wcbp-confirm { padding: 10px 20px; font-size: .75rem; }

/* ── Error ───────────────────────────────────────────────────── */
#wcbp-err { background: #fff5f5; color: #c0392b; border: 1px solid #f5c6c6; border-radius: 0; padding: 9px 12px; margin-bottom: 8px; font-size: .82rem; display: none; }

/* ── Loading spinner ─────────────────────────────────────────── */
#wcbp-load { text-align: center; padding: 48px 20px; display: none; }
.wspin { width: 42px; height: 42px; border: 3px solid #e0d5b8; border-top-color: #b3821c; border-radius: 50%; margin: 0 auto 14px; animation: wsp .75s linear infinite; }
@keyframes wsp { to { transform: rotate(360deg); } }

/* ── Checkout booking box ────────────────────────────────────── */
.wcbp-co-box { background: #faf7f0; border: 1px solid #e0d5b8; border-radius: 0; padding: 16px 18px; margin: 0 0 20px; }
.wcbp-co-box h3 { margin-top: 0; color: #b3821c; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.wcbp-co-box .input-text,
.wcbp-co-box select { width: 100% !important; box-sizing: border-box !important; }

/* ── Greeting card CSS ───────────────────────────────────────── */
.wcard-selects { display: flex; gap: 10px; margin-bottom: 14px; }
.wcard-selects .wf { margin-bottom: 0; }
.wcard-selects select { width: 100%; padding: 10px 12px; border: 1px solid #e0d5b8; border-radius: 0; font-size: .82rem; font-family: inherit; background: #faf7f0; color: #333; cursor: pointer; transition: border-color .15s; -webkit-appearance: auto; appearance: auto; }
.wcard-selects select:focus { outline: none; border-color: #b3821c; }

/* Card 3D flip */
#wcbp-card-wrap { perspective: 1000px; margin: 4px 0 0; }
#wcbp-card { width: 100%; height: 300px; position: relative; transform-style: preserve-3d; transition: transform 0.65s cubic-bezier(.4,0,.2,1); }
#wcbp-card.flipped { transform: rotateY(180deg); }
.card-face { position: absolute; top: 0; left: 0; width: 100%; height: 300px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid #e0d5b8; box-sizing: border-box; overflow: hidden; }

/* Card front */
.card-front { background: linear-gradient(135deg,#fdf9f0 55%,#f5e8c0 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px; text-align: center; cursor: pointer; height: 300px; }
.card-front .cf-logo { max-width: 90px; max-height: 60px; object-fit: contain; margin-bottom: 10px; }
.card-front .cf-logo-text { font-size: 1rem; font-weight: 700; color: #b3821c; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.card-front .cf-occ  { font-size: .95rem; font-weight: 700; color: #b3821c; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.card-front .cf-hint { font-size: .68rem; color: #c0a050; letter-spacing: .06em; }

/* Card back */
.card-back { background: #fff; transform: rotateY(180deg); padding: 16px 18px; display: flex; flex-direction: column; height: 300px; overflow-y: auto; }
.card-back .cb-dear        { font-size: 1.1rem; color: #888; font-family: "Cormorant Garamond",Georgia,serif; font-style: italic; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.card-back .cb-dear-static { color: #aaa; }
.card-back .cb-dear-name   { color: #b3821c; font-family: "Great Vibes",cursive; font-size: 1.5rem; line-height: 1; border: none; border-bottom: 1px dashed #e0d5b8; outline: none; background: transparent; width: 120px; min-width: 60px; max-width: 180px; padding: 0 2px; }
.card-back .cb-msg  { font-size: .9rem; color: #444; line-height: 1.6; border: none; resize: none; width: 100%; background: transparent; font-family: "Cormorant Garamond",Georgia,serif; outline: none; flex: 1; min-height: 60px; font-style: italic; }
.card-back .cb-char { font-size: .65rem; color: #ccc; text-align: right; margin-top: 2px; }
.card-back .cb-from     { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e0d5b8; }
.card-back .cb-from-lbl { font-size: .75rem; color: #aaa; font-family: "Cormorant Garamond",Georgia,serif; font-style: italic; }
.card-back .cb-from-name { font-size: 1.4rem; font-weight: 400; color: #b3821c; font-family: "Great Vibes",cursive; margin-top: 4px; line-height: 1.2; display: block; }

/* Sender field */
.wcbp-sender-wrap  { margin-top: 10px; }
.wcbp-sender-lbl   { display: block; font-size: .72rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.wcbp-sender-input { width: 100%; padding: 9px 12px; border: 1px solid #e0d5b8; background: #faf7f0; font-size: .88rem; font-family: inherit; color: #333; box-sizing: border-box; outline: none; transition: border-color .15s; }
.wcbp-sender-input:focus { border-color: #b3821c; }
.wcbp-sender-input::placeholder { color: #bbb; }

/* Flip button */
.card-flip-btn { width: 100%; padding: 9px; background: #faf7f0; border: 1px solid #e0d5b8; border-top: none; color: #b3821c; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: all .18s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.card-flip-btn:hover { background: #f5edd8; border-color: #b3821c; }

/* ── Tooltip info icon ───────────────────────────────────────── */
.wcbp-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    position: relative;
    transition: background-color 0.2s;
}

.wcbp-info-icon:hover {
    background-color: #9e7e0a;
}

.wcbp-tooltip {
   visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: -26%;
    transform: translateX(-26%);
    background-color: #1a1a1a;
    color: #fff;
    text-align: left;
    padding: 7px 10px;
    border-radius: 3px;
    font-size: 0.65rem;
    white-space: normal;
    width: 355px;
    z-index: 1000;
    line-height: 1.4;
    font-weight: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    text-transform: none;
}

.wcbp-info-icon:hover .wcbp-tooltip {
    visibility: visible;
    opacity: 1;
}

.wcbp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20%;
    transform: translateX(-25%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;

}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wo-grid .wo { flex: 1 1 calc(50% - 4px); }
    .wr { flex-direction: column; gap: 0; }
	button.wcbp-open {
    padding: 8px 10px !important;
    font-size: 0.5rem !important;
    letter-spacing: .1em !important;
}
}
