/* Base: lightbox hidden */
.fh-mb-chooser,
.fh-mb-panel {
    position: fixed;
    inset: 0;
    display: none;                 /* IMPORTANT */
    align-items: center;
    justify-content: center;
    z-index: 100001;
    font-family: inherit;
}

/* When open */
.fh-mb-chooser.fh-mb-chooser--open,
.fh-mb-panel.is-open {
    display: flex;
}

/* Dimmed background */
.fh-mb-chooser-overlay,
.fh-mb-panel__overlay {
    z-index: 100000;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

/* Dialog card */
.fh-mb-chooser-dialog {
    position: relative;
    background: white;
    padding: 150px 100px;
    width: 80%;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    z-index: 100001;
}

.fh-mb-panel__dialog{
    width: 80%;
    max-width: 1300px;
    max-height: 80vh;
    padding: 80px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    z-index: 100001;
}
.fh-mb-panel__dialog--confirm {
    max-width: 650px;
}
.fh-mb-panel__dialog--rename {
    max-width: 800px;
}
/* Close button */
.fh-mb-chooser-close,
.fh-mb-panel__close {
    position: absolute;
    top: 10px;
    right: 35px;
    background: none;
    border: 0;
    font-size: 60px;
    cursor: pointer;
}

/* Title */
.fh-mb-panel__title {
    text-align: center;
    margin: 0 0 24px;
}
.fh-mb-chooser-title {
    text-align: center;
    margin: 0 0 60px;
    font-size: 40px;
}

.fh-mb-chooser-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* center items if row not full */
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}
.fh-mb-chooser-item {
    border: 0;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    max-width: 110px;
}
.fh-mb-chooser--few .fh-mb-chooser-item {
    max-width: 20%;
}

.fh-mb-chooser-item.is-selected {
    border-color: #000;
}

/* Wrapper that controls thumbnail box, but keeps image ratio */
.fh-mb-chooser-thumb {
    width: 100%;
    overflow: hidden;     /* prevent super tall images from blowing up the card */
}

/* Image keeps its natural aspect ratio */
.fh-mb-chooser-thumb img {
    display: block;
    width: 100%;          /* scale to card width */
    height: auto;         /* keep original ratio */
}

.fh-mb-chooser-label {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    font-family: 'Circular', 'sans-serif';
    text-transform: uppercase;
    text-align: left;
}

/* Confirm button */
.fh-mb-chooser-confirm {
    display: block;
    margin: 0 auto;
    border: 0;
    padding: 10px 45px;
    font-family: 'Circular', 'sans-serif';
    background: #000;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    font-size: 14px;
}

/* Optional: lock body scroll while chooser open */
body.fh-mb-chooser-lock,
body.fh-mb-panel-lock {
    overflow: hidden;
}

/* Shared two-column panel layout (used for Notes, Rename, etc.) */
.fh-mb-panel-layout.fh-mb-panel-layout--two-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Panel title, e.g. "Notes", "Rename moodboard" */
.fh-mb-panel-layout__title {
    font-size: 30px;
    font-weight: 400;
    margin: 0 0 20px;
    text-transform: none;
}

/* Left/intro column */
.fh-mb-panel-layout__intro {
    width: 100%;
}

/* Right/main column (field area) */
.fh-mb-panel-layout__main {
    width: 100%;
}

/* Underlined field style for notes text area */
.fh-mb-notes-input,
.fh-mb-rename-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid black;
    padding: 4px 0;
    font-size: 20px;
    background: transparent;
    resize: vertical;
    outline: none;
}

/* Generic panel footer with right-aligned actions */
.fh-mb-panel-footer.fh-mb-panel-footer--actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

/* Notes “Save” button */
.fh-mb-notes-save,
.fh-mb-new-board-save,
.fh-mb-rename-board-save {
    min-width: 150px;
    padding: 10px 60px;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s ease all;
}
.fh-mb-new-board-save{
    width: 100%;
    padding: 20px;
}
.fh-mb-notes-save:hover,
.fh-mb-new-board-save:hover,
.fh-mb-rename-board-save:hover {
    background: white;
    color: black;
    text-decoration: none;
}

/* Disabled state */
.fh-mb-notes-save:disabled,
.fh-mb-new-board-save:disabled,
.fh-mb-rename-board-save:disabled {
    color: #b3b3b3;
    opacity: 0.6;
    text-decoration: none;
}

.fh-mb-notes-save:disabled:hover,
.fh-mb-new-board-save:disabled:hover,
.fh-mb-rename-board-save:disabled:hover {
    color: #b3b3b3;
    background: black;
    opacity: 0.6;
    cursor: not-allowed;
    text-decoration: none;
}

/* Saved-copy panel layout */
.fh-mb-panel--saved-copy .fh-mb-panel__dialog {
    max-width: 1180px;
}

.fh-mb-saved-copy-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18rem;
}

/* Left block: ADDED TO / Moodboard X */
.fh-mb-saved-copy-text {
    /* flex: 1 1 auto; */
}

.fh-mb-saved-copy-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-family: 'Circular';
}

.fh-mb-saved-copy-title {
    display: block;
    font-size: 30px;
    line-height: 1.4;
}

/* Right block: black button */
.fh-mb-saved-copy-actions {
    flex: 0 0 auto;
}

.fh-mb-saved-copy-btn {
    border: 1px solid black;
    padding: 20px 52px;
    font-family: 'Circular', 'sans-serif';
    background: #000;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .18em;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
}

/* Optional: button hover */
.fh-mb-saved-copy-btn:hover {
    background: #fff;
    color: #000;
}

/* Stack on mobile */
@media (max-width: 768px) {
    .fh-mb-notes.fh-mb-notes--two-col {
        flex-direction: column;
        gap: 2rem;
    }

    .fh-mb-chooser-dialog{
        width: 94%;
        min-height: 500px;
        max-height: 94%;
        padding: 80px 32px;
        overflow-y: auto;
    }
    .fh-mb-panel__dialog{
        width: 94%;
        min-height: 500px;
        max-height: 94%;
        padding: 80px 32px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .fh-mb-saved-copy-layout {
        flex-direction: column;
        gap: 5rem;
    }

    .fh-mb-panel__body{
        width: 100%;
    }
    .fh-mb-chooser-title{
        text-align: left;
    }
    .fh-mb-chooser-item{
        max-width: 150px;
    }
    .fh-mb-chooser--few .fh-mb-chooser-item{
        max-width: 250px;
    }
    .fh-mb-notes__intro {
        flex-basis: auto;
    }
    .fh-mb-notes-save,
    .fh-mb-new-board-save,
    .fh-mb-rename-board-save{
        width: 100%;
    }
    .fh-mb-panel-footer.fh-mb-panel-footer--actions{
        justify-content: flex-start
    }
}
