/*!
 * yv-shop lens configurator - modal + step UI.
 * Uses theme color variables so it inherits the site brand.
 */

html.yv-lens-open { overflow: hidden; }

.yv-lens-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.yv-lens-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.yv-lens-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}
.yv-lens-modal__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    background: var(--color-background, #fff);
    color: var(--color-text, #0f172a);
    border-radius: 18px;
    box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(10px);
    transition: transform 0.22s ease;
}
.yv-lens-modal[aria-hidden="false"] .yv-lens-modal__dialog { transform: translateY(0); }

.yv-lens-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.yv-lens-modal__breadcrumb {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted, #6b7280);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.yv-lens-modal__close {
    background: transparent;
    border: 0;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    transition: background 0.15s;
}
.yv-lens-modal__close:hover { background: var(--color-surface-hover, rgba(0,0,0,0.04)); }

.yv-lens-modal__progress {
    height: 3px;
    background: var(--color-border, #e5e7eb);
}
.yv-lens-modal__progress-bar {
    height: 100%;
    background: var(--color-primary, #111);
    transition: width 0.3s ease;
    width: 0%;
}

.yv-lens-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 22px;
}

.yv-lens-step__title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--color-text, #0f172a);
}
.yv-lens-step__hint {
    color: var(--color-text-muted, #6b7280);
    font-size: 14px;
    margin: 0 0 22px;
    line-height: 1.5;
}

.yv-lens-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.yv-lens-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    background: var(--color-background, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.yv-lens-option:hover {
    border-color: var(--color-primary, #111);
    background: var(--color-surface-hover, rgba(0,0,0,0.02));
}
.yv-lens-option:active { transform: scale(0.99); }
.yv-lens-option__label { font-weight: 500; }
.yv-lens-option__price {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary, #111);
    white-space: nowrap;
}

.yv-lens-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--color-surface, #f5f5f5);
    border-radius: 10px;
    margin-bottom: 20px;
}
.yv-lens-tab {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 500;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.yv-lens-tab.is-active {
    background: var(--color-background, #fff);
    color: var(--color-text, #0f172a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.yv-lens-tab-panel { display: none; }
.yv-lens-tab-panel.is-active { display: block; }

.yv-lens-prescription {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.yv-lens-prescription th, .yv-lens-prescription td {
    padding: 8px 6px;
    text-align: left;
    font-size: 13px;
}
.yv-lens-prescription thead th {
    color: var(--color-text-muted, #6b7280);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.yv-lens-prescription tbody th {
    font-weight: 600;
}
.yv-lens-prescription input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    font: inherit;
    background: var(--color-background, #fff);
    color: inherit;
}
.yv-lens-prescription input:focus {
    outline: none;
    border-color: var(--color-primary, #111);
}
.yv-lens-prescription__help {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
    margin: 4px 0 0;
}

.yv-lens-upload__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 22px;
    border: 2px dashed var(--color-border, #e5e7eb);
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    color: var(--color-text-muted, #6b7280);
    transition: border-color 0.15s, background 0.15s;
}
.yv-lens-upload__drop:hover {
    border-color: var(--color-primary, #111);
    background: var(--color-surface-hover, rgba(0,0,0,0.02));
}
.yv-lens-upload__label {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text, #0f172a);
    margin-top: 12px;
}
.yv-lens-upload__meta {
    font-size: 12px;
    margin-top: 4px;
}
.yv-lens-upload__preview {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--color-surface, #f5f5f5);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.yv-lens-upload__ok { color: var(--color-success, #059669); font-weight: 500; }
.yv-lens-upload__clear {
    background: transparent;
    border: 0;
    font-size: 20px;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
}

.yv-lens-pd__label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}
.yv-lens-pd__input {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    max-width: 180px;
}
.yv-lens-pd__input input {
    flex: 1;
    padding: 12px 14px;
    border: 0;
    font: inherit;
    font-size: 16px;
    background: transparent;
}
.yv-lens-pd__input input:focus { outline: none; }
.yv-lens-pd__unit {
    padding: 0 14px;
    color: var(--color-text-muted, #6b7280);
    border-left: 1px solid var(--color-border, #e5e7eb);
    font-size: 14px;
}
.yv-lens-pd__help, .yv-lens-pd-camera p {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    line-height: 1.5;
    margin-top: 12px;
}

.yv-lens-summary {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
}
.yv-lens-summary__row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.yv-lens-summary__row:last-child { border-bottom: 0; }
.yv-lens-summary__label {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
}
.yv-lens-summary__value {
    font-weight: 500;
}
.yv-lens-summary__price {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary, #111);
}
.yv-lens-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 18px 4px 0;
    font-size: 18px;
}
.yv-lens-summary__total-label {
    color: var(--color-text-muted, #6b7280);
    font-size: 14px;
}
.yv-lens-summary__total-value {
    font-weight: 700;
}

.yv-lens-modal__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-surface, #fafafa);
}
.yv-lens-modal__footer-spacer { flex: 1; }
.yv-lens-modal__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 8px;
}
.yv-lens-modal__price-label {
    font-size: 11px;
    color: var(--color-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.yv-lens-modal__price-value {
    font-weight: 700;
    font-size: 16px;
}

.yv-lens-error {
    color: var(--color-danger, #b91c1c);
    font-size: 14px;
}

@media (max-width: 640px) {
    .yv-lens-modal { padding: 0; align-items: stretch; }
    .yv-lens-modal__dialog {
        border-radius: 0;
        width: 100%;
        max-height: 100vh;
    }
    .yv-lens-prescription__add, .yv-lens-prescription__add input { display: none; }
}
