/* ==========================================================================
   Crown Troca products: quote request form (dialog on desktop, bottom sheet on phones)
   ========================================================================== */

.ctp .ctp-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px; }
.ctp .ctp-modal__backdrop { position: absolute; inset: 0; background: rgba(5, 4, 3, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s ease; }
.ctp .ctp-modal.is-open .ctp-modal__backdrop { opacity: 1; }
.ctp .ctp-modal__panel {
	position: relative; display: flex; flex-direction: column; width: min(640px, 100%); max-height: min(880px, calc(100dvh - 48px));
	overflow: hidden; border: 1px solid var(--line-2); border-radius: 28px; outline: 0;
	background: radial-gradient(500px 200px at 100% 0%, rgba(190, 166, 118, .1), transparent 70%), #13100d;
	box-shadow: 0 50px 140px rgba(0, 0, 0, .65);
	opacity: 0; transform: translateY(26px) scale(.98); transition: transform .5s var(--ease), opacity .35s ease;
}
.ctp .ctp-modal.is-open .ctp-modal__panel { opacity: 1; transform: none; }
.ctp .ctp-modal__grab { display: none; }
.ctp .ctp-modal__head { position: relative; display: grid; gap: 14px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.ctp .ctp-modal__titles { display: grid; gap: 6px; padding-right: 48px; }
.ctp .ctp-modal__kicker { font: 600 .6rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.ctp .ctp-modal__title { font: 400 clamp(1.7rem, 3vw, 2.1rem)/1.1 var(--serif); }
.ctp .ctp-modal__x { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--hair); color: var(--muted); transition: color .2s ease, border-color .2s ease, transform .3s var(--ease); }
.ctp .ctp-modal__x:hover { color: var(--text); border-color: var(--line-2); transform: rotate(90deg); }
.ctp .ctp-progress { display: flex; gap: 8px; }
.ctp .ctp-progress li { flex: 1; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 2px solid var(--hair); font: 600 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); transition: border-color .4s ease, color .4s ease; }
.ctp .ctp-progress li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; font-size: .62rem; letter-spacing: 0; }
.ctp .ctp-progress li.is-on { border-top-color: var(--gold); color: var(--gold-l); }
.ctp .ctp-progress li.is-done span { background: var(--gold); border-color: var(--gold); color: #17110a; }

.ctp .ctp-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ctp .ctp-form__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 8px; -webkit-overflow-scrolling: touch; }
.ctp .ctp-form__step { display: grid; gap: 20px; animation: ctp-step .45s var(--ease) both; }
.ctp .ctp-form__step.is-back { animation-name: ctp-step-back; }
@keyframes ctp-step { from { opacity: 0; transform: translateX(22px); } }
@keyframes ctp-step-back { from { opacity: 0; transform: translateX(-22px); } }

.ctp .ctp-field { display: grid; gap: 8px; min-width: 0; }
.ctp .ctp-field--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ctp .ctp-field--two > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ctp .ctp-field label, .ctp .ctp-field legend { font: 600 .64rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0; }
.ctp .ctp-field legend { margin-bottom: 10px; }
.ctp .ctp-opt { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--faint); }
.ctp .ctp-field input, .ctp .ctp-field select, .ctp .ctp-field textarea {
	width: 100%; height: 50px; padding: 0 16px !important; border-radius: 14px; border: 1px solid rgba(236, 230, 218, .14);
	background: rgba(255, 255, 255, .04); color: var(--text); font-size: 16px !important; line-height: 1.3;
	-webkit-appearance: none; appearance: none; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ctp .ctp-field textarea { height: auto; min-height: 92px; padding: 14px 16px !important; resize: vertical; line-height: 1.5; }
.ctp .ctp-field input::placeholder, .ctp .ctp-field textarea::placeholder { color: rgba(236, 230, 218, .32); }
.ctp .ctp-field input:focus, .ctp .ctp-field select:focus, .ctp .ctp-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(190, 166, 118, .18); background: rgba(255, 255, 255, .06); }
.ctp .ctp-field select { display: block !important; padding-right: 40px !important; background: rgba(255, 255, 255, .04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bea676' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; cursor: pointer; }
.ctp .ctp-field select option, .ctp .ctp-field select optgroup { background: #15120f; color: var(--text); }
.ctp .ctp-field.is-bad input, .ctp .ctp-field.is-bad select, .ctp .ctp-field--two > div.is-bad input { border-color: var(--danger); }
.ctp .ctp-err { min-height: 0; font-size: .76rem; color: var(--danger); line-height: 1.4; }
.ctp .ctp-err:empty { display: none; }
.ctp .ctp-hint { font-size: .72rem; color: var(--faint); }

.ctp .ctp-picked { display: flex; flex-wrap: wrap; gap: 8px; }
.ctp .ctp-picked li { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(190, 166, 118, .08); font-size: .84rem; animation: ctp-pop .35s var(--ease) both; }
.ctp .ctp-picked img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ctp .ctp-picked button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); }
.ctp .ctp-picked button:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.ctp .ctp-picked button .ctp-ico { width: 14px; height: 14px; }
.ctp .ctp-picked__empty { font-size: .84rem; color: var(--faint); padding: 8px 0; }
@keyframes ctp-pop { from { opacity: 0; transform: scale(.85); } }
.ctp .ctp-add { position: relative; display: flex; align-items: center; }
.ctp .ctp-add > .ctp-ico { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--gold); pointer-events: none; }
.ctp .ctp-field .ctp-add select { height: 44px; padding-left: 38px !important; border-style: dashed; border-color: var(--line-2); border-radius: 999px; color: var(--gold-l); font-size: .86rem; }

.ctp .ctp-qty { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; }
.ctp .ctp-field .ctp-seg__opt, .ctp .ctp-field .ctp-pick label { font: 400 .86rem/1.4 var(--sans); letter-spacing: normal; text-transform: none; color: var(--text); }
.ctp .ctp-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ctp .ctp-seg__opt { position: relative; display: block; cursor: pointer; }
.ctp .ctp-seg__opt input, .ctp .ctp-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ctp .ctp-seg__opt span { display: grid; gap: 6px; height: 100%; padding: 14px; border: 1px solid rgba(236, 230, 218, .14); border-radius: 16px; background: rgba(255, 255, 255, .03); transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.ctp .ctp-seg__opt b { font: 600 .95rem/1 var(--sans); color: var(--gold-l); letter-spacing: .04em; }
.ctp .ctp-seg__opt small { font-size: .72rem; line-height: 1.45; color: var(--muted); }
.ctp .ctp-seg__opt:active span { transform: scale(.98); }
.ctp .ctp-seg__opt input:checked + span { border-color: var(--gold); background: rgba(190, 166, 118, .12); box-shadow: inset 0 0 0 1px var(--gold); }
.ctp .ctp-seg__opt input:focus-visible + span, .ctp .ctp-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.ctp .ctp-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.ctp .ctp-pick label { position: relative; cursor: pointer; }
.ctp .ctp-pick span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(236, 230, 218, .14); font-size: .82rem; color: var(--muted); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.ctp .ctp-pick input:checked + span { background: var(--gold); border-color: var(--gold); color: #17110a; font-weight: 600; }
.ctp .ctp-wa-input { position: relative; }
.ctp .ctp-wa-input .ctp-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--wa); }
.ctp .ctp-field .ctp-wa-input input { padding-left: 46px !important; }
.ctp .ctp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ctp .ctp-privacy { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); font-size: .74rem; line-height: 1.55; color: var(--faint); }
.ctp .ctp-privacy .ctp-ico { color: var(--gold); flex: none; margin-top: 1px; }

.ctp .ctp-form__msg { padding: 0 28px; font-size: .8rem; color: var(--danger); }
.ctp .ctp-form__msg:empty { display: none; }
.ctp .ctp-modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 20px; border-top: 1px solid var(--line); }
.ctp .ctp-modal__foot [data-ctp-back] { margin-right: auto; }
.ctp .ctp-modal__foot .ctp-btn.is-busy { pointer-events: none; opacity: .75; }
.ctp .ctp-modal__foot .ctp-btn.is-busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ctp-spin .7s linear infinite; }
.ctp .ctp-modal__foot .ctp-btn.is-busy .ctp-ico { display: none; }

.ctp .ctp-done { justify-items: center; text-align: center; padding: 18px 0 22px; gap: 14px; }
.ctp .ctp-done__mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, rgba(121, 173, 135, .25), rgba(74, 124, 89, .08)); border: 1px solid rgba(121, 173, 135, .6); color: var(--green-l); animation: ctp-pop .6s var(--ease) both; }
.ctp .ctp-done__mark .ctp-ico { width: 38px; height: 38px; stroke-width: 2; stroke-dasharray: 30; stroke-dashoffset: 30; animation: ctp-draw .7s var(--ease) .25s forwards; }
@keyframes ctp-draw { to { stroke-dashoffset: 0; } }
.ctp .ctp-done__title { font: 400 2rem/1.1 var(--serif); }
.ctp .ctp-done__text { max-width: 440px; color: var(--muted); line-height: 1.7; }
.ctp .ctp-done__ref { padding: 10px 18px; border-radius: 999px; border: 1px dashed var(--line-2); font-size: .8rem; color: var(--muted); }
.ctp .ctp-done__ref b { color: var(--gold-l); letter-spacing: .06em; }
.ctp .ctp-done__btns { display: grid; gap: 10px; width: 100%; max-width: 380px; margin-top: 6px; }

.ctp .ctp-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100001; transform: translate(-50%, 20px); opacity: 0; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(20, 17, 13, .96); color: var(--text); font-size: .82rem; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: transform .35s var(--ease), opacity .3s ease; pointer-events: none; }
.ctp .ctp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Body scroll lock while the form is open (iOS ignores overflow hidden on body). */
html.ctp-lock, html.ctp-lock body { overflow: hidden !important; }
html.ctp-lock body { position: fixed !important; left: 0; right: 0; width: 100%; }

@media (max-width: 640px) {
	.ctp .ctp-modal { place-items: end center; padding: 0; }
	.ctp .ctp-modal__panel { width: 100%; max-height: 94dvh; border-radius: 26px 26px 0 0; border-bottom: 0; opacity: 1; transform: translateY(100%); transition: transform .5s var(--ease); }
	.ctp .ctp-modal.is-open .ctp-modal__panel { transform: translateY(var(--drag, 0px)); }
	.ctp .ctp-modal.is-dragging .ctp-modal__panel { transition: none; }
	.ctp .ctp-modal__grab { display: grid; place-items: center; height: 22px; padding-top: 8px; touch-action: none; }
	.ctp .ctp-modal__grab span { width: 42px; height: 5px; border-radius: 3px; background: rgba(236, 230, 218, .25); }
	.ctp .ctp-modal__head { padding: 6px 18px 14px; touch-action: none; }
	.ctp .ctp-modal__x { top: 2px; right: 12px; width: 38px; height: 38px; }
	.ctp .ctp-form__body { padding: 18px 18px 6px; }
	.ctp .ctp-form__msg { padding: 0 18px; }
	.ctp .ctp-modal__foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
	.ctp .ctp-modal__foot .ctp-btn { flex: 1; min-height: 52px; }
	.ctp .ctp-modal__foot [data-ctp-back] { flex: 0 0 auto; margin-right: 0; }
	.ctp .ctp-field--two { grid-template-columns: 1fr; }
	.ctp .ctp-qty { grid-template-columns: minmax(0, 1fr) 150px; }
	.ctp .ctp-seg { grid-template-columns: 1fr; }
	.ctp .ctp-seg__opt span { grid-template-columns: 74px 1fr; align-items: center; padding: 12px 14px; }
}
