/**
 * ISC Product Calculator - Frontend Styles
 *
 * Styling for calculator form on product pages.
 */

/* Widen the calculator section on product pages (Salient theme) */
.single-product .configurator-wrap:has(.isc-calculator-form) {
    display: flex;
    justify-content: center;
}

.single-product .configurator-wrap:has(.isc-calculator-form) .configurator-inner-spacer-left,
.single-product .configurator-wrap:has(.isc-calculator-form) .configurator-inner-spacer-right {
    display: none;
}

.single-product .configurator-wrap:has(.isc-calculator-form) .configurator-inner-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Calculator form container - wider layout */
.isc-calculator-form {
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border: none;
    width: 100%;
    max-width: 100%;
}

/* Calculator fields wrapper */
.isc-calculator-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Field row - card style matching awspc-field-row */
.isc-field-row {
    margin-bottom: 1em;
}

.isc-field-content {
    padding: 0 1em 1em 1em;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Field label - matching awspc-field-label-line */
.isc-field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
    line-height: calc(1 + 0.8);
    letter-spacing: 0.06rem;
    padding-top: 1em;
}

.isc-required {
    color: #cf2409;
    margin-left: 2px;
}

/* Numeric input - full width */
.isc-numeric-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.isc-numeric-input {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
}

.isc-numeric-input:focus {
    border-color: #999;
    outline: none;
}

/* Numeric validation states */
.isc-numeric-input:invalid,
.isc-numeric-input.isc-invalid {
    border-color: #d63638;
    background-color: #fff5f5;
}

.isc-numeric-input:invalid:focus,
.isc-numeric-input.isc-invalid:focus {
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.2);
}

.isc-validation-hint {
    display: none;
    margin-top: 8px;
    color: #d63638;
    font-size: 13px;
    font-weight: 400;
}

.isc-validation-hint.visible {
    display: block;
}

.isc-unit {
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}

/* Dropdown - full width */
.isc-dropdown {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    color: #333;
}

.isc-dropdown:focus {
    border-color: #999;
    outline: none;
}

/* Radio group */
.isc-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.isc-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, background-color 0.2s;
}

.isc-radio-option:hover {
    border-color: #999;
    background: #f5f5f5;
}

.isc-radio-option input[type="radio"] {
    margin: 0;
    accent-color: #333;
}

.isc-radio-option input[type="radio"]:checked + .isc-radio-label,
.isc-radio-option:has(input[type="radio"]:checked) .isc-radio-label {
    font-weight: 600;
    color: #333;
}

.isc-radio-image {
    width: var(--isc-radio-image-width, 40px);
    height: var(--isc-radio-image-height, 40px);
    object-fit: cover;
    border-radius: 4px;
}

/* Predefined image sizes */
.isc-radio-group.isc-image-size-small .isc-radio-image {
    width: 30px;
    height: 30px;
}

.isc-radio-group.isc-image-size-medium .isc-radio-image {
    width: 50px;
    height: 50px;
}

.isc-radio-group.isc-image-size-large .isc-radio-image {
    width: 80px;
    height: 80px;
}

.isc-radio-group.isc-image-size-xlarge .isc-radio-image {
    width: 120px;
    height: 120px;
}

.isc-radio-label {
    font-size: 14px;
    color: #333;
}

/* Radio options with images - card grid layout */
.isc-radio-group-with-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: start;
}

.isc-partial-images {
    align-items: stretch;
}

.isc-radio-group-with-images .isc-radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.isc-radio-group-with-images .isc-radio-option:hover {
    border-color: #666;
}

.isc-radio-group-with-images .isc-radio-option:has(input:checked) {
    border-color: #333;
}

.isc-radio-group-with-images .isc-radio-option input[type="radio"] {
    display: none;
}

.isc-radio-group-with-images .isc-radio-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #f8f8f8;
    flex-shrink: 0;
}

.isc-radio-group-with-images .isc-radio-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin-bottom: 0;
    border-radius: 0;
}

/* Inline image layout — respects configured width/height instead of card fill */
.isc-radio-group-inline-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.isc-radio-group-inline-images .isc-radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.isc-radio-group-inline-images .isc-radio-option:hover {
    border-color: #666;
}

.isc-radio-group-inline-images .isc-radio-option:has(input:checked) {
    border-color: #333;
}

.isc-radio-group-inline-images .isc-radio-option input[type="radio"] {
    display: none;
}

.isc-radio-group-inline-images .isc-radio-image {
    border-radius: 4px;
    margin-bottom: 4px;
}

.isc-radio-group-inline-images .isc-radio-image-wrapper {
    position: relative;
}

/* Taller aspect ratio for non-Lichtschacht gewebe image cards (portrait images).
 * Bewusst nur im Card-Mode (.isc-radio-group-with-images) — im Inline-Mode würde
 * 2/3 den Wrapper unter dem Bild auf 1.5× Bildhöhe aufblähen → großer Leerraum. */
.isc-field-row[data-template-key*="gewebe"]:not([data-template-key="gewebe_lichtschachtabdeckung"]) .isc-radio-group-with-images .isc-radio-image-wrapper {
    aspect-ratio: 2 / 3;
}

/* Smaller image cards when only some options have images */
.isc-partial-images .isc-radio-image-wrapper {
    max-width: 300px;
    aspect-ratio: auto;
}

.isc-partial-images .isc-radio-option:not(:has(.isc-radio-image-wrapper)) .isc-radio-label-row {
    flex: 1;
    align-content: center;
}

.isc-radio-group-with-images .isc-radio-label-row {
    display: flex;
    padding: 6px 4px 4px;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-content: start;
    flex-wrap: wrap;
    font-size: 12px;
    line-height: 1.3;
    min-height: 50px;
    color: #333;
}

.isc-radio-surcharge {
    display: block;
    width: 100%;
    font-size: 13px;
    color: #333;
    margin-top: 2px;
}

.isc-radio-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Image zoom button */
.isc-radio-image-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
}

.isc-radio-image-wrapper .isc-radio-image {
    flex: 1;
    min-height: 0;
}

.isc-image-zoom-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    padding: 0;
    opacity: 1;
    transition: background 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    border: 1.5px solid #333;
    z-index: 2;
}

.isc-image-zoom-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Image lightbox overlay */
.isc-image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000000;
    cursor: pointer;
}

.isc-image-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: #fff;
    padding: 16px;
}

.isc-image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 22px;
    line-height: 40px;
    text-align: center;
    padding: 0;
    color: #333;
}

/* Color swatches */
.isc-color-swatches-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.isc-swatch-category-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: -4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.isc-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 440px;
}

.isc-color-swatch {
    position: relative;
    cursor: pointer;
}

.isc-color-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.isc-swatch-color {
    display: block;
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.isc-color-swatch:hover .isc-swatch-color {
    border-color: #999;
    transform: scale(1.08);
}

.isc-color-swatch.selected .isc-swatch-color,
.isc-color-swatch input[type="radio"]:checked + .isc-swatch-color {
    border-color: #fff;
    border-width: 3px;
    /* Double ring: white inner (border) + dark outer (box-shadow) for visibility on any color */
    box-shadow:
        0 0 0 2px #333,
        0 0 8px rgba(0, 0, 0, 0.25);
}

/* Checkmark indicator for selected color swatch */
.isc-color-swatch.selected::after,
.isc-color-swatch:has(input[type="radio"]:checked)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.isc-color-swatch.selected::before,
.isc-color-swatch:has(input[type="radio"]:checked)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-60%, -55%) rotate(-45deg);
    width: 8px;
    height: 4px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    z-index: 1;
}

.isc-selected-color-label {
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.isc-selected-color-label:empty {
    display: none;
}

/* Text input - full width */
.isc-text-input {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
}

.isc-text-input:focus {
    border-color: #999;
    outline: none;
}

/* Textarea input */
.isc-textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
    color: #333;
    min-height: 80px;
    resize: vertical;
}

.isc-textarea:focus {
    border-color: #999;
    outline: none;
}

/* Price display - matching .price-wrapper from theme */
.isc-price-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-top: 16px;
    margin-bottom: 15px;
    background-color: #f5f5f5;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.isc-price-label {
    font-weight: 500;
    font-size: 1.12em;
    color: rgba(35, 35, 35, 0.75);
}

.isc-price-value {
    font-weight: 600;
    font-size: 1.12em;
    color: #cf2409;
    margin-right: 0.3em;
    transition: opacity 0.2s;
}

/* Loading state */
.isc-price-value.isc-loading {
    opacity: 0.5;
}

.isc-price-value.isc-loading::after {
    content: '...';
    animation: isc-dots 1s steps(4, end) infinite;
}

@keyframes isc-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Error state */
.isc-price-display.isc-price-error {
    background-color: #fcf0f1;
    border: 1px solid #f0c6c8;
}

.isc-price-display.isc-price-error .isc-price-value {
    color: #8a1e1e;
    font-weight: 500;
}

/* Price breakdown */
.isc-price-breakdown {
    margin-top: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
    font-size: 14px;
}

.isc-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.isc-breakdown-row.isc-breakdown-surcharge {
    color: #666;
    font-size: 13px;
}

.isc-breakdown-row.isc-breakdown-multiplier {
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 8px;
}

.isc-breakdown-label {
    color: #666;
}

.isc-breakdown-value {
    font-weight: 500;
}

/* Manufacturing dimensions display */
.isc-dimension-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.isc-dimension-info::before {
    content: '→';
    color: #999;
}

.isc-manufacturing-width,
.isc-manufacturing-height,
.isc-area-display {
    font-weight: 500;
    color: #333;
}

/* No fields message */
.isc-no-fields {
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Validation error state - full red outline */
.isc-field-row.isc-error .isc-field-content {
    border-color: #d63638;
    background-color: #fef7f7;
}

.isc-field-row.isc-error .isc-numeric-input,
.isc-field-row.isc-error .isc-dropdown,
.isc-field-row.isc-error .isc-text-input,
.isc-field-row.isc-error .isc-textarea {
    border-color: #d63638;
    background-color: #fff;
}

/* Error state for radio/color groups */
.isc-field-row.isc-error .isc-radio-option,
.isc-field-row.isc-error .isc-swatch-color {
    border-color: #d63638;
}

.isc-error-message {
    margin-top: 8px;
    color: #d63638;
    font-size: 13px;
}

/* Required field hint (tooltip style) */
.isc-required-hint {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #d63638;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    position: relative;
    animation: isc-fade-in 0.3s ease-out;
}

.isc-required-hint::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #d63638;
}

@keyframes isc-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    /* Remove padding from parent containers on mobile to match image width */
    .single-product .configurator-wrap:has(.isc-calculator-form) {
        padding-left: 0;
        padding-right: 0;
    }

    .single-product .configurator-inner-content:has(.isc-calculator-form) {
        padding-left: 0;
        padding-right: 0;
    }

    .single-product .summary.entry-summary:has(.isc-calculator-form) {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* Calculator form - full width on mobile */
    .isc-calculator-form {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .isc-calculator-fields {
        gap: 8px;
    }

    .isc-field-row {
        margin-bottom: 0.5em;
    }

    .isc-field-content {
        padding: 12px 14px 14px 14px;
        border-radius: 6px;
        margin-left: 4px;
        margin-right: 4px;
    }

    .isc-field-label {
        font-size: 15px;
        padding-top: 0;
        margin-bottom: 8px;
    }

    .isc-numeric-input,
    .isc-dropdown,
    .isc-text-input,
    .isc-textarea {
        padding: 10px 12px;
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    .isc-radio-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .isc-radio-option {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 10px 12px;
        justify-content: center;
    }

    .isc-radio-group-with-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .isc-swatch-color {
        width: 36px;
        height: 36px;
    }

    .isc-price-display {
        margin-top: 12px;
        padding: 10px 14px;
    }

    .isc-dimension-info {
        font-size: 12px;
    }
}

/* ========================================
   Cart Display Styles
   ======================================== */

/* Cart item configuration display */
.woocommerce-cart-form .cart_item .variation dt,
.woocommerce-cart-form .cart_item .variation dd {
    display: inline;
    margin: 0;
    font-size: 13px;
}

.woocommerce-cart-form .cart_item .variation dt {
    font-weight: 600;
    text-decoration: underline;
    margin-right: 5px;
}

.woocommerce-cart-form .cart_item .variation dd {
    margin-bottom: 5px;
}

.woocommerce-cart-form .cart_item .variation dd::after {
    content: '';
    display: block;
}

/* Highlight dimensions in cart */
.woocommerce-cart-form .cart_item .variation dt:contains("Fertigungsmaße"),
.woocommerce-cart-form .cart_item .variation dt:contains("Dimensions") {
    color: #333;
}

/* Mini cart in header / cart slider */
.widget_shopping_cart .cart_list .variation {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.widget_shopping_cart .cart_list .variation dt {
    font-weight: 500;
    text-decoration: underline;
}

/* Order details in admin */
.isc-order-item-breakdown {
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 13px;
}

.isc-order-item-breakdown strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

/* Checkout order review */
.woocommerce-checkout-review-order .cart_item .variation {
    font-size: 12px;
    color: #666;
}

.woocommerce-checkout-review-order .cart_item .variation dt {
    font-weight: 600;
    text-decoration: underline;
}

/* Order confirmation / Thank you page */
.woocommerce-order-details .wc-item-meta {
    margin-top: 8px;
}

.woocommerce-order-details .wc-item-meta li {
    margin-bottom: 4px;
    font-size: 13px;
}

.woocommerce-order-details .wc-item-meta li strong {
    display: inline-block;
    min-width: 120px;
}

/* ========================================
   Add to Cart Error Message
   ======================================== */

.isc-add-to-cart-error {
    background-color: #fcf0f1;
    border: 1px solid #f0c6c8;
    border-left: 4px solid #d63638;
    color: #8a1e1e;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    animation: isc-shake 0.5s ease-in-out;
}

@keyframes isc-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ========================================
   Info Button and Modal
   ======================================== */

/* Body scroll lock when info modal is open */
html.isc-info-modal-open,
body.isc-info-modal-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Info button in field label */
.isc-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    margin-left: 6px;
    padding: 0;
    background: #e8e8e8;
    border: none;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.isc-info-btn:hover {
    background: #333;
    color: #fff;
}

.isc-info-btn:focus {
    outline: none;
    background: #333;
    color: #fff;
}

.isc-info-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Info Modal Container - wraps everything, extremely high z-index to be above shop header */
.isc-info-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info Modal Overlay */
.isc-info-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* Info Modal Content */
.isc-info-modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 660px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Info Modal Header */
.isc-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}

.isc-info-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.isc-info-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.isc-info-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.isc-info-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Info Modal Body */
.isc-info-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Info Text Content */
.isc-info-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.isc-info-text:last-child {
    margin-bottom: 0;
}

.isc-info-text p {
    margin: 0 0 12px 0;
}

.isc-info-text p:last-child {
    margin-bottom: 0;
}

/* Structured Info Sections */
.isc-info-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.isc-info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.isc-info-heading {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

.isc-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}

.isc-info-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 4px;
    line-height: 1.6;
    list-style: none !important;
}

.isc-info-list li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: #666;
    font-size: 10px;
    top: 2px;
}

.isc-info-hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 16px 0;
}

.isc-info-recommendation {
    margin: 8px 0 0 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #4a90a4;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #555;
}

/* Info Images Gallery */
.isc-info-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.isc-info-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
}

.isc-info-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.isc-info-image-wrapper:hover .isc-info-image {
    transform: scale(1.02);
}

/* Single image layout */
.isc-info-images.single-image {
    grid-template-columns: 1fr;
}

.isc-info-images.single-image .isc-info-image-wrapper {
    max-width: 100%;
}

/* Image Lightbox - above the info modal */
.isc-info-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.isc-info-lightbox.visible {
    opacity: 1;
    visibility: visible;
}

.isc-info-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.isc-info-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.isc-info-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.isc-info-lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Mobile responsiveness for info modal */
@media (max-width: 600px) {
    .isc-info-modal-content {
        width: calc(100% - 24px);
        max-height: calc(100vh - 48px);
        border-radius: 10px;
    }

    .isc-info-modal-header {
        padding: 14px 18px;
    }

    .isc-info-modal-title {
        font-size: 16px;
    }

    .isc-info-modal-body {
        padding: 18px;
    }

    .isc-info-text {
        font-size: 14px;
    }

    .isc-info-images {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


/* Conditional hints for numeric fields */
.isc-conditional-hint {
    background: #e7f3fe;
    border-left: 4px solid #2196F3;
    padding: 10px 14px;
    margin: 8px 0 0 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #1565C0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.isc-conditional-hint .dashicons {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #2196F3;
}
