/* ==========================================================================
   Mulhern Lacing Lookup — lacing-options.css  v1.0.0
   ========================================================================== */

/* --- Trigger button ------------------------------------------------------- */
.mll-wrapper {
    display: inline-block;
    margin: 8px 0;
}

.mll-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #1a5c8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.mll-trigger-btn:hover,
.mll-trigger-btn:focus-visible {
    background-color: #154d75;
    box-shadow: 0 2px 6px rgba(26, 92, 138, 0.35);
    outline: none;
}

/* --- Overlay -------------------------------------------------------------- */
.mll-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: mllFadeIn 0.18s ease;
}

@keyframes mllFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Modal box ------------------------------------------------------------ */
.mll-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 800px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: mllSlideUp 0.2s ease;
}

@keyframes mllSlideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* --- Header --------------------------------------------------------------- */
.mll-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #1a5c8a;
    color: #fff;
    flex-shrink: 0;
}

.mll-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.mll-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.mll-modal-close:hover { color: #fff; }

/* --- Modal body ----------------------------------------------------------- */
.mll-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* --- Thickness summary bar ------------------------------------------------ */
.mll-thickness-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 12px 20px;
    background: #f0f6fb;
    border-bottom: 1px solid #d0e3f0;
    font-size: 13px;
}

.mll-thickness-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mll-thickness-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a5c8a;
}

.mll-thickness-range {
    color: #333;
}

.mll-thickness-range strong {
    color: #1a5c8a;
}

/* --- Results table -------------------------------------------------------- */
.mll-table-wrap {
    padding: 0 20px 16px;
    overflow-x: auto;
}

.mll-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 14px;
}

.mll-table thead tr {
    background: #1a5c8a;
    color: #fff;
}

.mll-table thead th {
    padding: 9px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mll-table tbody tr {
    border-bottom: 1px solid #e8eef3;
    transition: background 0.1s ease;
}

.mll-table tbody tr:nth-child(even) { background: #f7fafc; }
.mll-table tbody tr:hover           { background: #eaf3fb; }

.mll-table td {
    padding: 8px 12px;
    color: #333;
    vertical-align: middle;
}

/* Type group divider row */
.mll-type-group td {
    background: #ddeaf4 !important;
    font-weight: 700;
    font-size: 12px;
    color: #1a5c8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
}

/* Recessed Cover badge */
.mll-badge-recessed {
    display: inline-block;
    background: #eaf4ea;
    color: #2a6e2a;
    border: 1px solid #aad4aa;
    border-radius: 3px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* N/A for null hinge pin values */
.mll-na {
    color: #aaa;
    font-style: italic;
    font-size: 12px;
}

/* --- Empty state ---------------------------------------------------------- */
.mll-no-results {
    padding: 36px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.mll-no-results svg {
    display: block;
    margin: 0 auto 12px;
    opacity: 0.3;
}

/* --- Loading spinner ------------------------------------------------------ */
.mll-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 20px;
    gap: 14px;
    color: #666;
    font-size: 14px;
}

.mll-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #d0e3f0;
    border-top-color: #1a5c8a;
    border-radius: 50%;
    animation: mllSpin 0.7s linear infinite;
}

@keyframes mllSpin {
    to { transform: rotate(360deg); }
}

/* --- Error state ---------------------------------------------------------- */
.mll-error {
    padding: 28px 20px;
    text-align: center;
    color: #c0392b;
    font-size: 14px;
}

/* --- Footer --------------------------------------------------------------- */
.mll-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e0eaf2;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

.mll-close-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.mll-close-btn:hover { background: #5a6268; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 600px) {
    .mll-modal { max-height: 93vh; }
    .mll-modal-header h3 { font-size: 15px; }
    .mll-thickness-summary { flex-direction: column; gap: 10px; }
    .mll-table { font-size: 12px; }
    .mll-table thead th,
    .mll-table td { padding: 7px 8px; }
}
