/* RGH Compositions browser: draft visual style */

/* Force the Compositions page background to black */
.page-id-510,
.page-id-510 #page-container,
.page-id-510 #et-main-area,
.page-id-510 #main-content,
.page-id-510 .entry-content,
.page-id-510 .et_builder_inner_content,
.page-id-510 .et_pb_section,
.page-id-510 .et_pb_row,
.page-id-510 .et_pb_column,
.page-id-510 .et_pb_module {
    background-color: #000;
}

/* Main browser wrapper */
.rgh-compositions-browser {
    display: flex;
    gap: 2rem;
    align-items: flex-start;

    background: #000;
    color: #fff;
    font-family: "Raleway", sans-serif;
}

/* Each column scrolls internally if taller than 75vh */
.rgh-compositions-column {
    box-sizing: border-box;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Initial/category state */
.rgh-compositions-column-1 {
    flex: 0 0 32%;
}

.rgh-compositions-column-2 {
    flex: 1;
}

.rgh-compositions-column-3 {
    display: none;
    flex: 1.5;
}

/* Detail state: Column 1 hidden, Column 2 shifts left, Column 3 appears */
.rgh-state-composition-selected .rgh-compositions-column-1 {
    display: none;
}

.rgh-state-composition-selected .rgh-compositions-column-2 {
    flex: 0 0 32%;
}

.rgh-state-composition-selected .rgh-compositions-column-3 {
    display: block;
}

/* Column headings */
.rgh-column-heading {
    margin: 0 0 0.15em;
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-weight: 400;
    line-height: 1.15;
}

.rgh-compositions-column-1 .rgh-column-heading {
    font-size: 33pt;
}

.rgh-compositions-column-2 .rgh-column-heading,
.rgh-compositions-column-3 .rgh-column-heading {
    font-size: 27pt;
}

.rgh-column-subheading {
    font-size: 0.85em;
    margin-bottom: 1em;
    color: #fff;
}

/* Remove list styling */
.rgh-composition-categories,
.rgh-composition-title-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rgh-composition-categories li,
.rgh-composition-title-list li {
    margin: 0 0 0.35em;
    padding: 0;
}

/* Make buttons look like text */
.rgh-category-button,
.rgh-composition-title-button,
.rgh-back-to-categories {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;

    color: inherit;
    font-family: "Raleway", sans-serif;
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

/* Draft type sizes */
.rgh-category-button {
    font-size: 33pt;
}

.rgh-composition-title-button,
.rgh-composition-detail-content,
.rgh-detail-row,
.rgh-back-to-categories {
    font-size: 27pt;
}

/* Links look exactly like surrounding text */
.rgh-compositions-browser a,
.rgh-compositions-browser a:visited,
.rgh-compositions-browser a:hover,
.rgh-compositions-browser a:active {
    color: inherit;
    text-decoration: none;
}

/* Selected text color */
.rgh-category-button.rgh-is-active,
.rgh-composition-title-button.rgh-is-active {
    color: #639af4;
    font-weight: 500;
}

/* Detail title */
.rgh-composition-detail-title {
    margin: 0 0 0.75em;
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-size: 27pt;
    font-weight: 400;
    line-height: 1.2;
}

/* Detail rows */
.rgh-detail-row {
    margin-bottom: 0.75em;
}

.rgh-detail-label {
    color: #fff;
    font-weight: 500;
}

.rgh-detail-value {
    color: #fff;
    font-weight: 400;
}

/* Media caption */
.rgh-media-caption {
    color: #fff;
    font-size: 27pt;
    font-weight: 400;
}

/* Optional fixed publisher photo, not active unless markup is added later */
.rgh-publisher-photo {
    margin: 0.75rem 0 1rem;
}

.rgh-publisher-photo img {
    display: block;
    max-width: 220px;
    height: auto;
}

/* Current working typography and list cleanup 


Will all be cleaned up when finalized


*/

/* Remove all residual bullets/markers inside the browser */
.rgh-compositions-browser ul,
.rgh-compositions-browser ol,
.rgh-compositions-browser li {
    list-style: none !important;
    list-style-type: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.rgh-compositions-browser li::marker {
    content: "" !important;
}

/* More reasonable draft type sizes */
.rgh-category-button {
    font-size: 22px;
    line-height: 1.35;
}

.rgh-composition-title-button {
    font-size: 20px;
    line-height: 1.35;
}

.rgh-composition-detail-content,
.rgh-detail-row,
.rgh-detail-value,
.rgh-media-caption {
    font-size: 18px;
    line-height: 1.7;
}

/* Column headings */
.rgh-compositions-column-1 .rgh-column-heading,
.rgh-compositions-column-2 .rgh-column-heading,
.rgh-compositions-column-3 .rgh-column-heading {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 500;
}

/* Column 1 subheading */
.rgh-column-subheading {
    font-size: 16px;
    line-height: 1.3;
}

/* Column 3 composition title */
.rgh-composition-detail-title {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 500;
}

/* Column 3 labels: h2/h3-like treatment */
.rgh-detail-label {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 500;
    margin: 1.1em 0 0.25em;
}

/* Detail rows: keep label/value group readable */
.rgh-detail-row {
    margin-bottom: 0.9em;
}

/* Back button should not be huge */
.rgh-back-to-categories {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Selected text */
.rgh-category-button.rgh-is-active,
.rgh-composition-title-button.rgh-is-active {
    color: #639af4;
    font-weight: 500;
}

/* Initial Column 2 image state */

.rgh-column-2-intro-image {
    display: block;
    max-height: 75vh;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 900ms ease,
        transform 1200ms ease,
        max-height 1200ms ease;
}

.rgh-column-2-intro-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
}

/* Hide title/results until a category is selected */
.rgh-column-2-results-wrap {
    display: none;
}

/* Once a category is selected, reveal title/results */
.rgh-state-category-selected .rgh-column-2-results-wrap,
.rgh-state-composition-selected .rgh-column-2-results-wrap {
    display: block;
}

/* Slide intro image out to the right after category selection */
.rgh-state-category-selected .rgh-column-2-intro-image,
.rgh-state-composition-selected .rgh-column-2-intro-image {
    opacity: 0;
    transform: translateX(110%);
    max-height: 0;
    pointer-events: none;
}

/* Column 2 intro image: force current state behavior */

.rgh-column-2-intro-image {
    display: block;
    max-height: 75vh;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 900ms ease,
        transform 1400ms ease,
        max-height 1400ms ease;
}

.rgh-column-2-intro-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
}

.rgh-column-2-results-wrap {
    display: none;
}

.rgh-state-category-selected .rgh-column-2-results-wrap,
.rgh-state-composition-selected .rgh-column-2-results-wrap {
    display: block;
}

.rgh-state-category-selected .rgh-column-2-intro-image,
.rgh-state-composition-selected .rgh-column-2-intro-image {
    opacity: 0 !important;
    transform: translateX(120%) !important;
    max-height: 0 !important;
    pointer-events: none !important;
}
/* Column 3: keep composition title visible while details scroll */

.rgh-state-composition-selected .rgh-compositions-column-3 {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rgh-composition-details {
    flex: 1 1 auto;
    min-height: 0;
}

.rgh-composition-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.rgh-composition-detail-title {
    flex: 0 0 auto;
    margin: 0 0 0.75em;
    padding-bottom: 0.35em;
    background-color: #000;
}

.rgh-composition-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Column 3: fixed controls/title with independently scrolling details */

.rgh-state-composition-selected .rgh-compositions-column-3 {
    display: flex;
    flex-direction: column;

    height: 75vh;
    max-height: 75vh;
    min-height: 0;

    overflow: hidden;
}

/* Keep the back control and DETAILS heading outside the scrolling area */
.rgh-state-composition-selected .rgh-back-to-categories,
.rgh-state-composition-selected
    .rgh-compositions-column-3 > .rgh-column-heading {
    flex: 0 0 auto;
}

/* AJAX target must occupy the remaining height */
.rgh-composition-details {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Returned AJAX content */
.rgh-composition-detail-content {
    display: flex;
    flex-direction: column;

    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Composition title remains visible */
.rgh-composition-detail-title {
    flex: 0 0 auto;
    margin: 0 0 0.75em;
    padding: 0 0 0.35em;

    background-color: #000;
}

/* Only the content below the composition title scrolls */
.rgh-composition-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 1rem;
}
    
    /* Tighten spacing between selected title and first detail field */

.rgh-composition-detail-title {
    margin-bottom: 0.3em;
    padding-bottom: 0;
}

.rgh-composition-detail-scroll .rgh-detail-row:first-child .rgh-detail-label {
    margin-top: 0;
}

/* Link colors */

/* Link colors */

.rgh-compositions-column-3 a,
.rgh-compositions-column-3 a:link {
    color: #639af4;
    font-weight: 500;
}


.rgh-compositions-browser a:visited {
    color: #9faaa7;
}

/* Tighten caption spacing below audio/video embeds */
.rgh-detail-row-av-embed,
.rgh-detail-row-av-embed-2 {
    margin-bottom: 0.25em;
}

.rgh-av-embed iframe {
    display: block;
}

.rgh-media-caption {
    margin-top: 0.25em;
}

/* Widen Column 1 for longer genre labels */
.rgh-compositions-browser.rgh-state-initial,
.rgh-compositions-browser.rgh-state-category-selected {
    grid-template-columns: minmax(26rem, 36%) minmax(0, 1fr) minmax(0, 0) !important;
}

.rgh-category-button {
    white-space: normal !important;
    line-height: 1.25 !important;
}
/* rgh-is-visited is the JS class that controls the visited links in compositions. Only changing visited in compositions doesn't affect the output */
/* Persistent visited state for Column 2 title buttons */
.rgh-composition-title-button.rgh-is-visited {
    color: #9faaa7 !important;
}

/* Current selected title should override visited state */
.rgh-composition-title-button.rgh-is-active {
    color: #e18c37 !important;
    font-weight: 500;
}

/* Make Read More match Column 3 field headings Such as Publisher and Score 
This can be deleted but is retained in case we need to revert to it*/
.rgh-detail-row-read-more .rgh-read-more-link {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
}
/* Make Read More look like a Column 3 heading while remaining a link */
.rgh-detail-row-read-more .rgh-read-more-link,
.rgh-detail-row-read-more .rgh-read-more-link:link,
.rgh-detail-row-read-more .rgh-read-more-link:visited,
.rgh-detail-row-read-more .rgh-read-more-link:hover,
.rgh-detail-row-read-more .rgh-read-more-link:active {
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

/* Compositions: consistent hanging indents */

/* Genre labels */
.rgh-category-button,

/* Composition titles in Column 2 */
.rgh-composition-title-button,

/* Column headings */
.rgh-compositions-browser .rgh-column-heading,

/* Selected composition title in Column 3 */
.rgh-composition-detail-title {
    padding-left: 1.5em;
    text-indent: -1.5em;
    line-height: 1.35;
}


/* =============================================================
   Phone: three-screen Compositions browser (genres → titles → details)
   Desktop/tablet behavior remains unchanged.
   ============================================================= */
.rgh-mobile-titles-navigation { display: none; }

@media (max-width: 767px) {
    .rgh-compositions-browser {
        display: block !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .rgh-compositions-browser .rgh-compositions-column {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
        padding-right: 0;
    }

    /* Initial screen: genres only; never display the Harpist image. */
    .rgh-compositions-browser .rgh-column-2-intro-image {
        display: none !important;
    }
    .rgh-compositions-browser.rgh-state-initial .rgh-compositions-column-1 {
        display: block !important;
    }
    .rgh-compositions-browser.rgh-state-initial .rgh-compositions-column-2,
    .rgh-compositions-browser.rgh-state-initial .rgh-compositions-column-3 {
        display: none !important;
    }

    /* Screen 2: replace genres with the selected category's title list. */
    .rgh-compositions-browser.rgh-state-category-selected .rgh-compositions-column-1,
    .rgh-compositions-browser.rgh-state-category-selected .rgh-compositions-column-3 {
        display: none !important;
    }
    .rgh-compositions-browser.rgh-state-category-selected .rgh-compositions-column-2 {
        display: block !important;
    }
    .rgh-compositions-browser .rgh-mobile-titles-navigation {
        display: block;
        margin: 0 0 1rem;
    }
    .rgh-compositions-browser .rgh-mobile-back-to-categories {
        appearance: none;
        border: 0;
        background: transparent;
        color: #639af4;
        font: 500 18px/1.4 "Raleway", sans-serif;
        text-align: left;
        padding: 0;
        margin: 0 0 .65rem;
        cursor: pointer;
    }
    .rgh-compositions-browser .rgh-mobile-category-label {
        font: 500 22px/1.3 "Raleway", sans-serif;
        color: #fff;
        overflow-wrap: anywhere;
    }

    /* Screen 3: details only; the return control leads to titles. */
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-compositions-column-1,
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-compositions-column-2 {
        display: none !important;
    }
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-compositions-column-3 {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-composition-details,
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-composition-detail-content,
    .rgh-compositions-browser.rgh-state-composition-selected .rgh-composition-detail-scroll {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .rgh-compositions-browser .rgh-category-button,
    .rgh-compositions-browser .rgh-composition-title-button {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}
/* Compositions: horizontal margins on phones */
@media (max-width: 767px) {
    .rgh-compositions-browser {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }
}
/* ==========================================================
   COMPOSITIONS — GENRE TYPOGRAPHY
   Match Research page
   ========================================================== */

.rgh-compositions-column-1 .rgh-column-heading {
    font-family: "Raleway", sans-serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.35;
    color: #ffffff;
    text-transform: capitalize;
}

.rgh-compositions-column-1 .rgh-category-button {
    font-family: "Raleway", sans-serif;
    font-size: 19px;
    font-weight: 629;
    line-height: 1.35 !important;
    color: #ffffff;
}

/* Spacing between genre entries */
.rgh-compositions-column-1 .rgh-composition-categories li {
    margin-bottom: 0 !important;
    padding-bottom: 1em !important;
}

/* Selected genre */
.rgh-compositions-browser
.rgh-compositions-column-1
.rgh-category-button.rgh-is-active {
    color: #639af4 !important;
}

/* ==========================================================
   TOUCH TABLETS: persistent indicators for scrollable columns.
   Visual overlay; native touch scrolling remains unchanged.
   ========================================================== */
.rgh-tablet-scroll-track {
    display: none;
}

@media (min-width: 768px) and (max-width: 1400px) and (hover: none) and (pointer: coarse) {
    .rgh-compositions-browser {
        position: relative;
    }

    .rgh-compositions-browser .rgh-tablet-scroll-track {
        position: absolute;
        display: block;
        width: 10px;
        box-sizing: border-box;
        border-radius: 5px;
        background: #303536;
        pointer-events: none;
        z-index: 10;
    }

    .rgh-compositions-browser .rgh-tablet-scroll-track[hidden] {
        display: none;
    }

    .rgh-compositions-browser .rgh-tablet-scroll-track .rgh-tablet-scroll-thumb {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        border-radius: 5px;
        background-color: #c5cfcc !important;
        opacity: 1 !important;
        box-shadow: inset 0 0 0 1px #dde5e2;
        will-change: transform;
    }
}
