/* Florea — Online ordering */

.flr-item-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.flr-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem;
    border: 1px solid var(--flr-border);
    border-radius: var(--flr-radius-pill);
    background: color-mix(in srgb, var(--rose-200) 6%, transparent);
}

.flr-qty__btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rose-600) 18%, transparent);
    color: var(--rose-200);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--flr-transition), color var(--flr-transition);
}

.flr-qty__btn:hover {
    background: var(--rose-600);
    color: var(--rose-100);
}

.flr-qty__value {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
    color: var(--rose-100);
}

/* Floating cart button */
.flr-cart-fab {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    left: calc(1.25rem + env(safe-area-inset-left, 0px));
    z-index: 4000;
    width: 58px;
    height: 58px;
    border: 1px solid var(--flr-border-strong);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wine-800), var(--rose-700));
    color: var(--rose-100);
    box-shadow: var(--flr-shadow-gold);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform var(--flr-transition), box-shadow var(--flr-transition);
}

.flr-cart-fab:hover {
    transform: translateY(-3px) scale(1.03);
}

.flr-cart-fab__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--flr-radius-pill);
    background: var(--rose-500);
    color: var(--wine-900);
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Order drawer */
.flr-order-drawer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
    isolation: isolate;
}

.flr-order-drawer.is-open {
    pointer-events: auto;
}

.flr-order-drawer__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--flr-overlay);
    opacity: 0;
    transition: opacity var(--flr-transition);
}

.flr-order-drawer.is-open .flr-order-drawer__overlay {
    opacity: 1;
}

.flr-order-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: min(420px, 100%);
    height: 100%;
    max-height: 100dvh;
    background-color: var(--t1-bg);
    background-image: linear-gradient(180deg, var(--wine-800), var(--wine-900));
    border-left: 1px solid var(--flr-border-strong);
    box-shadow: var(--flr-shadow);
    transform: translateX(-100%);
    transition: transform var(--flr-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[dir="rtl"] .flr-order-drawer__panel {
    left: auto;
    right: 0;
    border-left: none;
    border-right: 1px solid var(--flr-border-strong);
    transform: translateX(100%);
}

.flr-order-drawer.is-open .flr-order-drawer__panel {
    transform: translateX(0);
}

[dir="rtl"] .flr-order-drawer.is-open .flr-order-drawer__panel {
    transform: translateX(0);
}

.flr-order-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--flr-border);
}

.flr-order-drawer__head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--rose-100);
}

.flr-order-drawer__close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--flr-border);
    border-radius: 50%;
    background: transparent;
    color: var(--rose-200);
    cursor: pointer;
}

.flr-order-drawer__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

.flr-order-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.flr-order-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--flr-border);
    border-radius: var(--flr-radius-sm);
    background: color-mix(in srgb, var(--rose-200) 5%, transparent);
}

.flr-order-item__img {
    width: 56px;
    height: 56px;
    border-radius: var(--flr-radius-sm);
    overflow: hidden;
}

.flr-order-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flr-order-item__meta {
    min-width: 0;
}

.flr-order-item__title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--rose-100);
    overflow-wrap: anywhere;
}

.flr-order-item__price {
    font-size: 0.8rem;
    color: var(--flr-text-muted);
}

.flr-order-empty {
    text-align: center;
    color: var(--flr-text-muted);
    padding: 1rem 0;
}

.flr-order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--flr-border-strong);
    border-radius: var(--flr-radius-sm);
    background: color-mix(in srgb, var(--rose-500) 8%, transparent);
    color: var(--rose-200);
}

.flr-order-summary strong {
    color: var(--rose-100);
    font-size: 1rem;
}

.flr-order-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.flr-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: var(--rose-200);
}

.flr-field input,
.flr-field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--flr-border);
    border-radius: var(--flr-radius-sm);
    background: color-mix(in srgb, var(--rose-200) 6%, transparent);
    color: var(--rose-100);
    font-family: var(--flr-font);
    font-size: 0.9rem;
    line-height: 1.55;
    outline: none;
    transition: border-color var(--flr-transition), box-shadow var(--flr-transition);
}

.flr-field textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.flr-field input::placeholder,
.flr-field textarea::placeholder {
    color: color-mix(in srgb, var(--flr-text-muted) 85%, transparent);
}

.flr-field input:focus,
.flr-field textarea:focus {
    border-color: var(--rose-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose-500) 15%, transparent);
}

.flr-captcha-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.flr-captcha-row input {
    flex: 1;
}

.flr-order-form__note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--flr-text-muted);
    line-height: 1.6;
}

.flr-order-form__alert {
    padding: 0.75rem 0.9rem;
    border-radius: var(--flr-radius-sm);
    font-size: 0.85rem;
    line-height: 1.5;
}

.flr-order-form__alert.is-error {
    background: color-mix(in srgb, var(--rose-700) 25%, transparent);
    border: 1px solid color-mix(in srgb, var(--rose-600) 40%, transparent);
    color: var(--rose-200);
}

.flr-order-form__alert.is-success {
    background: color-mix(in srgb, var(--rose-400) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--rose-400) 35%, transparent);
    color: var(--rose-100);
}

.flr-order-submit {
    width: 100%;
    margin-top: 0.25rem;
}

.flr-order-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.flr-order-toast {
    position: fixed;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 5100;
    padding: 0.85rem 1.25rem;
    border-radius: var(--flr-radius-pill);
    background: var(--wine-800);
    border: 1px solid var(--flr-border-strong);
    color: var(--rose-100);
    box-shadow: var(--flr-shadow-soft);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: min(90vw, 360px);
    text-align: center;
}

.flr-order-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.flr-order-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6.75rem, 1fr));
    gap: 0.55rem;
    padding: 0.7rem;
    border-radius: var(--flr-radius);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--flr-gold) 10%, transparent), transparent 70%),
        color-mix(in srgb, var(--rose-200) 4%, var(--flr-surface));
    border: 1px solid color-mix(in srgb, var(--flr-gold) 18%, var(--flr-border));
    position: relative;
    overflow: hidden;
}

.flr-order-types--simple::before {
    display: none;
}

.flr-order-types--simple .flr-order-type__face {
    min-height: 4.5rem;
}

.flr-order-types::before {
    content: '';
    position: absolute;
    top: 0.35rem;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--flr-gold) 35%, transparent), transparent);
    pointer-events: none;
}

.flr-order-type {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.flr-order-type__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.flr-order-type__face {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 5.25rem;
    padding: 0.7rem 0.45rem 0.55rem;
    border: 1px solid var(--flr-border);
    border-radius: 1.35rem 1.35rem 1.35rem 0.4rem;
    background: color-mix(in srgb, var(--flr-glass-bg) 85%, transparent);
    text-align: center;
    transition:
        border-color var(--flr-transition),
        background var(--flr-transition),
        box-shadow var(--flr-transition),
        transform 0.25s ease;
}

.flr-order-type:hover .flr-order-type__face {
    border-color: color-mix(in srgb, var(--flr-gold) 32%, var(--flr-border));
    transform: translateY(-1px);
}

.flr-order-type:has(input:checked) .flr-order-type__face {
    border-color: color-mix(in srgb, var(--flr-gold) 55%, var(--rose-500));
    background:
        linear-gradient(155deg, color-mix(in srgb, var(--flr-gold) 16%, transparent), color-mix(in srgb, var(--rose-500) 9%, transparent)),
        color-mix(in srgb, var(--wine-800) 35%, transparent);
    box-shadow:
        0 8px 22px color-mix(in srgb, var(--flr-gold) 16%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--flr-champagne) 12%, transparent);
}

.flr-order-type:has(input:focus-visible) .flr-order-type__face {
    outline: 2px solid color-mix(in srgb, var(--flr-gold) 55%, transparent);
    outline-offset: 2px;
}

.flr-order-type__petal {
    position: absolute;
    top: -0.15rem;
    right: 0.4rem;
    color: var(--flr-rose-soft);
    opacity: 0;
    transform: rotate(-18deg) scale(0.55);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--flr-gold) 25%, transparent));
}

.flr-order-type:has(input:checked) .flr-order-type__petal {
    opacity: 0.9;
    transform: rotate(-10deg) scale(1);
}

.flr-order-type__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    font-size: 0.92rem;
    color: var(--flr-gold);
    background: color-mix(in srgb, var(--flr-gold) 11%, transparent);
    border: 1px solid color-mix(in srgb, var(--flr-gold) 28%, transparent);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.flr-order-type:has(input:checked) .flr-order-type__icon {
    color: var(--wine-900);
    background: linear-gradient(135deg, var(--flr-gold), var(--rose-400));
    border-color: color-mix(in srgb, var(--flr-champagne) 40%, transparent);
}

.flr-order-type__text {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rose-200);
    letter-spacing: 0.01em;
}

.flr-order-type:has(input:checked) .flr-order-type__text {
    color: var(--flr-champagne);
}

.flr-order-type__bloom {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--flr-gold);
    opacity: 0;
    box-shadow: 0 0 0 0 transparent;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.flr-order-type:has(input:checked) .flr-order-type__bloom {
    opacity: 1;
    box-shadow: 0 0 10px color-mix(in srgb, var(--flr-gold) 70%, transparent);
}

.flr-field__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.flr-field__label-petal {
    opacity: 0.75;
    transform: rotate(-8deg);
    filter: drop-shadow(0 1px 4px color-mix(in srgb, var(--flr-gold) 30%, transparent));
}

.flr-order-track {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flr-order-track__step {
    padding: 0.35rem 0.65rem;
    border-radius: var(--flr-radius-pill);
    border: 1px solid var(--flr-border);
    font-size: 0.75rem;
    color: var(--flr-text-muted);
}

.flr-order-track__step.is-done {
    border-color: var(--rose-500);
    color: var(--rose-100);
}

.flr-order-track__step.is-active {
    background: color-mix(in srgb, var(--rose-500) 20%, transparent);
    color: var(--rose-100);
}

.is-hidden {
    display: none !important;
}


@media (max-width: 575px) {
    .flr-order-drawer__panel {
        width: 100%;
    }

    .flr-order-item {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 0.55rem 0.65rem;
        align-items: start;
    }

    .flr-order-item__img {
        width: 52px;
        height: 52px;
        grid-row: 1 / 3;
    }

    .flr-order-item .flr-qty {
        grid-column: 2;
        justify-self: end;
    }

    .flr-order-types {
        grid-template-columns: 1fr;
    }

    .flr-cart-fab {
        width: 52px;
        height: 52px;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        left: calc(1rem + env(safe-area-inset-left, 0px));
    }
}
