/* Imagelet Product Types - Reusable Modal Styling */

.ipt-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
}

.ipt-modal-overlay.active {
    display: flex;
}

body.ipt-modal-open {
    overflow: hidden;
}

.ipt-modal-window {
    background: #fff;
    width: 100%;
    max-width: 720px;
    margin: auto;
    border-radius: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    box-sizing: border-box;
}

.ipt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.ipt-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: #222;
}

/*
 * Defeat the theme's default <button> styling (gray background fill,
 * box-shadow, text-transform) so the close button reads as a plain ×.
 */
.ipt-modal-overlay .ipt-modal-close,
.ipt-modal-overlay .ipt-modal-close:hover,
.ipt-modal-overlay .ipt-modal-close:focus,
.ipt-modal-overlay .ipt-modal-close:active {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #666 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border-radius: 0 !important;
    outline: none !important;
    transition: color 0.15s ease !important;
}

.ipt-modal-overlay .ipt-modal-close:hover {
    color: #000 !important;
}

.ipt-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

@media (max-width: 480px) {
    .ipt-modal-overlay {
        padding: 0;
    }
    .ipt-modal-window {
        max-height: 100vh;
        border-radius: 0;
    }
}
