/* LensDelivery_ContactLenses */

.ld-rx {
    margin: 1em 0; padding: 1em;
    border: 1px solid #e5e7eb; border-radius: .5em; background: #fff;
    box-sizing: border-box; max-width: 36em;
}

/* Mode radios */
.ld-rx__mode { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: .5em; margin-bottom: 1em; width: 100%; }
.ld-rx__radio {
    flex: 1; display: flex; align-items: center; gap: .5em;
    padding: .55em .75em; cursor: pointer;
    border: 1px solid #e5e7eb; border-radius: .35em; background: #fff;
    font-size: .9em; color: #374151; user-select: none;
    transition: all .15s ease;
}
.ld-rx__radio:hover           { border-color: #9ca3af; }
.ld-rx__radio.is-active       { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.ld-rx__radio input[type=radio] { accent-color: #2563eb; flex-shrink: 0; }

/* Field row */
.ld-field { margin-bottom: .75em; }
.ld-field__label { display: block; font-size: .8em; font-weight: 500; color: #374151; margin-bottom: .25em; }

/* Qty input */
.ld-qty {
    padding: .4em .55em; border: 1px solid #d1d5db; border-radius: .3em; background: #fff;
    font-size: .9em; color: #1f2937; line-height: 1.3; width: 4.5em;
}
.ld-qty:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

/* Two-eye grid - ALWAYS 2 columns, even on mobile */
.ld-rx__eyes { display: grid; grid-template-columns: 1fr 1fr; gap: .75em; }
.ld-eye      {
    padding: .75em; border: 1px solid #e5e7eb; border-radius: .35em; background: #fafafa;
    transition: opacity .2s ease, filter .2s ease;
}
.ld-eye__title { margin: 0 0 .5em; font-size: .9em; font-weight: 600; color: #1f2937; }
/* Right eye disabled state when "Same" is selected */
.ld-eye.is-disabled {
    opacity: .5; filter: grayscale(50%); pointer-events: none;
    background: #f3f4f6;
}

/* Fixed single-value attribute */
.ld-field--fixed .ld-field__label { color: #4b5563; }
.ld-fixed {
    padding: .4em .55em; border: 1px solid #e5e7eb; border-radius: .3em;
    background: #f9fafb; color: #1f2937; font-size: .9em; line-height: 1.3;
    display: inline-block; min-width: 3em;
}
.ld-fixed__value { font-weight: 500; }

/* ===== Custom dropdown ===== */
.ld-dd { position: relative; }
.ld-dd__btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: .4em .55em; border: 1px solid #d1d5db; border-radius: .3em;
    background: #fff; cursor: pointer; font-size: .9em; line-height: 1.3; color: #1f2937;
    text-align: left; box-sizing: border-box;
}
.ld-dd__btn:hover:not(:disabled) { border-color: #9ca3af; }
.ld-dd__btn:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.ld-dd.is-open .ld-dd__btn { border-color: #2563eb; }
.ld-dd__label.is-placeholder { color: #9ca3af; }
.ld-dd__arrow {
    margin-left: .35em; font-size: .85em; transition: transform .2s ease;
    color: #6b7280; line-height: 1; flex-shrink: 0;
}
.ld-dd.is-open .ld-dd__arrow { transform: rotate(180deg); }

.ld-dd__panel {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50;
    background: #fff; border: 1px solid #d1d5db; border-radius: .35em;
    box-shadow: 0 6px 16px rgba(0,0,0,.08); max-height: 22em; overflow: hidden;
}
.ld-dd__cols { display: grid; max-height: 22em; overflow-y: auto; padding: .4em; gap: .3em; }
.ld-dd__cols--1 { grid-template-columns: 1fr; }
.ld-dd__cols--2 { grid-template-columns: 1fr 1fr; }
.ld-dd__col     { display: flex; flex-direction: column; gap: .2em; }
.ld-dd__col-head {
    position: sticky; top: -.4em; z-index: 1;
    text-align: center; font-weight: 700; font-size: 1em; padding: .3em 0;
    background: #fff; margin: -.4em -.4em .2em -.4em;
}
.ld-dd__col--neg .ld-dd__col-head { color: #dc2626; background: #fef2f2; border-bottom: 1px solid #fee2e2; }
.ld-dd__col--pos .ld-dd__col-head { color: #047857; background: #ecfdf5; border-bottom: 1px solid #d1fae5; }
.ld-dd__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25em; }
.ld-dd__opt {
    padding: .35em .5em; cursor: pointer; font-size: .85em; color: #1f2937;
    border: 1px solid #e5e7eb; border-radius: .3em; background: #fff;
    text-align: center; user-select: none; transition: all .15s ease; line-height: 1.3;
}
.ld-dd__opt:hover                       { border-color: #9ca3af; background: #f9fafb; }
.ld-dd__col--neg .ld-dd__opt:hover      { border-color: #dc2626; color: #dc2626; }
.ld-dd__col--pos .ld-dd__opt:hover      { border-color: #047857; color: #047857; }
.ld-dd__opt.is-selected                 { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600; }

[x-cloak] { display: none !important; }


/* ============ Shipping info card (PDP) ============ */
.ld-ship{
    margin: 1em 0; padding: 1em 1.1em;
    border: 1px solid #e5e7eb; border-radius: .6em;
    background: #fff; width: 100%; box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.ld-ship__grid{
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55em 1em;
}
@media (max-width: 460px){ .ld-ship__grid{ grid-template-columns: 1fr; } }
.ld-ship__item{
    display: flex; align-items: center; gap: .65em;
    padding: .35em 0; min-width: 0;
}
.ld-ship__icon{
    width: 2em; height: 2em; flex-shrink: 0;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    padding: .35em; box-sizing: border-box;
}
.ld-ship__icon svg{ width: 100%; height: 100%; display: block; }
.ld-ship__item--stock-yes .ld-ship__icon{ background: #ecfdf5; color: #047857; }
.ld-ship__item--stock-no  .ld-ship__icon{ background: #fef2f2; color: #dc2626; }
.ld-ship__item--free      .ld-ship__icon{ background: #eff6ff; color: #2563eb; }
.ld-ship__item--gift      .ld-ship__icon{ background: #fff1f2; color: #e11d48; }
.ld-ship__item--dispatch  .ld-ship__icon{ background: #fef3c7; color: #b45309; }
.ld-ship__item--returns   .ld-ship__icon{ background: #ede9fe; color: #6d28d9; }
.ld-ship__text{
    display: flex; flex-direction: column; gap: .05em; line-height: 1.25;
    flex: 1 1 auto; min-width: 0;
}
.ld-ship__label{ font-size: .75em; color: #6b7280; }
.ld-ship__value{ font-size: .9em; font-weight: 600; color: #111827; }
.ld-ship__value--green{ color: #047857; }
.ld-ship__value--red  { color: #dc2626; }

.ld-ship__carriers{
    margin-top: .85em; padding-top: .75em;
    border-top: 1px dashed #e5e7eb;
    display: flex; align-items: center; gap: .65em; flex-wrap: wrap;
}
.ld-ship__carriers-title{ font-size: .82em; color: #6b7280; }
.ld-ship-carrier{
    display: inline-flex; align-items: center; gap: .4em;
    font-size: .82em; color: #1f2937;
    padding: .15em .55em .15em .25em; border-radius: .35em;
    background: #fff; border: 1px solid #e5e7eb;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ld-ship-carrier:hover{ border-color: #d1d5db; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ld-ship-carrier{ padding: .25em .5em; text-decoration: none; }
.ld-ship-carrier__logo{
    height: 1.4em; width: auto; max-width: 7em;
    display: block; object-fit: contain;
}

/* ============ Package size picker ============ */
.ld-pkg{
    margin: 1em 0; padding: .85em 1em;
    border: 1px solid #e5e7eb; border-radius: .5em; background: #fff;
}
.ld-pkg__header{
    display: flex; align-items: baseline; gap: .5em; margin-bottom: .65em;
}
.ld-pkg__title{ font-size: .95em; font-weight: 600; color: #111827; }
.ld-pkg__code{ font-size: .75em; color: #9ca3af; font-family: monospace; }
.ld-pkg__options{
    display: grid; grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
    gap: .5em;
}
.ld-pkg__opt{
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .15em; padding: .55em .5em;
    border: 1.5px solid #e5e7eb; border-radius: .4em;
    background: #fff; cursor: pointer; text-align: center;
    transition: all .15s ease; user-select: none;
}
.ld-pkg__opt:hover{ border-color: #9ca3af; }
.ld-pkg__opt.is-selected{
    border-color: #2563eb; background: #eff6ff;
}
.ld-pkg__radio{ position: absolute; opacity: 0; pointer-events: none; }
.ld-pkg__opt-title{ font-size: .9em; font-weight: 600; color: #1f2937; }
.ld-pkg__opt.is-selected .ld-pkg__opt-title{ color: #1d4ed8; }
.ld-pkg__opt-price{ font-size: .85em; color: #4b5563; font-weight: 500; }
.ld-pkg__opt.is-selected .ld-pkg__opt-price{ color: #1d4ed8; }

/* Validation error highlight */
.ld-error.ld-dd .ld-dd__btn{
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.ld-error.ld-pkg{
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.ld-error{ animation: ld-shake 0.35s ease-in-out; }
@keyframes ld-shake{
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Force product-actions row to align left edge of form */
.product-info-main .product-actions,
.column.main .product-actions,
.ld-rx + * .product-actions,
.product-actions{
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}
/* Hide the separate additional-actions container if it duplicates wishlist/compare */
.product-info-main .product-info-additional-actions,
.product-info-main [class*=additional.actions]{
    display: none !important;
}
