/*
 * Standalone (Home Screen) Reset UI
 *
 * iOS “Add to Home Screen” web clips remove Safari chrome, so users lose refresh/back.
 * This adds a visible “Start over” control ONLY when running in standalone mode.
 */

/* Hidden by default */
.amb-ufh-configurator-actions{ display:none; }
.amb-ufh-reset-btn{ display:none; }

/* Shown only when JS marks standalone */
html.amb-ufh-standalone .amb-ufh-configurator-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

html.amb-ufh-standalone .amb-ufh-reset-btn{

    opacity: 1 !important;
    display:inline-flex;
    align-items:center;
    gap:6px;
    background: rgba(243, 111, 47, 0.06) !important;
    border: 1.5px solid rgba(243, 111, 47, 0.45) !important;
    border-radius: 999px;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    -webkit-appearance: none;
    appearance: none;
    color:#f36f2f !important;
    cursor:pointer;
    padding: 8px 12px 8px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

html.amb-ufh-standalone .amb-ufh-reset-btn svg{
    width: 15px;
    height: 15px;
    flex-shrink:0;
}

html.amb-ufh-standalone .amb-ufh-reset-btn .amb-ufh-reset-label{
    color:#f36f2f !important;
    -webkit-text-fill-color:#f36f2f !important;
}

html.amb-ufh-standalone .amb-ufh-reset-btn svg{
    stroke:#f36f2f !important;
}

html.amb-ufh-standalone .amb-ufh-reset-btn:hover,
html.amb-ufh-standalone .amb-ufh-reset-btn:focus{
    background: rgba(243, 111, 47, 0.10);
    border-color:#f36f2f;
    outline:none;
}

html.amb-ufh-standalone .amb-ufh-reset-btn:active{
    background: rgba(243, 111, 47, 0.15);
}

/* If space gets tight, hide the label and keep just the icon */
@media (max-width: 380px) {
    html.amb-ufh-standalone .amb-ufh-reset-label{ display:none; }
    html.amb-ufh-standalone .amb-ufh-reset-btn{
        padding: 8px;
        width: 36px;
        height: 36px;
        justify-content:center;
    }
}

/* --- Confirm sheet (iOS-style bottom sheet) --- */
#amb-ufh-reset-confirm {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 env(safe-area-inset-bottom, 16px) 0;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#amb-ufh-reset-confirm.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.amb-ufh-reset-sheet {
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 18px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 480px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);

    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

#amb-ufh-reset-confirm.is-visible .amb-ufh-reset-sheet {
    transform: translateY(0);
}

.amb-ufh-reset-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.amb-ufh-reset-body {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
}

.amb-ufh-reset-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amb-ufh-reset-yes {
    background: #f36f2f;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    min-height: 50px;
}

.amb-ufh-reset-no {
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-height: 50px;
}
