/* =======================================================================
   ZOL — Delivery proof feature
   ======================================================================= */

/* Settings subhead inside a section */
.settings-subhead {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--paper-3);
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--forest);
    font-weight: 500;
}

/* ============== Driver delivery proof modal ===================== */
.deliver-proof-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.deliver-proof-modal[hidden] { display: none !important; }

.deliver-proof-head {
    background: var(--shop-primary);
    color: var(--shop-on-primary);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.deliver-proof-head h2 {
    font-family: var(--font-display);
    font-size: 18px;
    margin: 0;
    color: currentColor;
    font-weight: 500;
}
.deliver-proof-head .step-pill {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.deliver-proof-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.deliver-proof-body h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--forest);
    margin: 0 0 8px;
}
.deliver-proof-body .body-sub {
    color: rgba(14, 31, 20, 0.65);
    font-size: 14px;
    margin: 0 0 18px;
}

/* Signature pad */
.sig-pad-wrap {
    background: #fff;
    border: 2px dashed var(--paper-3);
    border-radius: var(--radius-md);
    padding: 8px;
    margin-bottom: 12px;
    position: relative;
}
.sig-pad {
    width: 100%;
    height: 220px;
    background: #fff;
    border-radius: 6px;
    cursor: crosshair;
    touch-action: none;
    display: block;
}
.sig-pad-placeholder {
    position: absolute;
    inset: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(14, 31, 20, 0.3);
    font-style: italic;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.sig-pad-placeholder.is-hidden { opacity: 0; }
.sig-clear-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.sig-clear-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}

/* Camera capture for payment proof */
.camera-pick {
    background: var(--paper-2);
    border: 2px dashed var(--paper-3);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    margin-bottom: 16px;
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease;
}
.camera-pick:hover {
    border-color: var(--shop-primary);
    background: #fff;
}
.camera-pick svg {
    color: var(--shop-primary);
    margin-bottom: 8px;
}
.camera-pick-hint {
    color: rgba(14, 31, 20, 0.55);
    font-size: 13px;
}
.camera-preview {
    margin-bottom: 16px;
    text-align: center;
}
.camera-preview img {
    max-width: 100%;
    max-height: 360px;
    border-radius: var(--radius-md);
    border: 1px solid var(--paper-3);
}
.camera-preview .retake-btn {
    margin-top: 10px;
}

.deliver-proof-foot {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--paper-3);
    background: #fff;
    display: flex;
    gap: 10px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.deliver-proof-foot .btn {
    flex: 1;
}

/* ============== Admin order detail: proof section =============== */
.proof-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.proof-thumb {
    background: var(--paper);
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-sm);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    color: rgba(14, 31, 20, 0.5);
    font-size: 13px;
    text-align: center;
    padding: 12px;
    transition: border-color 120ms ease;
    position: relative;
}
.proof-thumb:hover { border-color: var(--shop-primary); }
.proof-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.proof-thumb-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
}
