﻿/* Shared auditions UI: conflict calendar + member modals (cp-auditions-common). */

/* Shared cp-auditions shell (signup, register, potential members). */
.cp-postcontent .cp-auditions h3,
.cp-postcontent .cp-auditions__section-title {
    margin: 0 0 0.5rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #3d2314 !important;
}

.cp-postcontent .cp-auditions__message,
.cp-postcontent .cp-auditions__notice {
    margin: 0.75rem 0;
}

.cp-postcontent .cp-auditions__notice.is-error {
    color: #741F11;
    font-weight: 600;
}

.cp-postcontent .cp-auditions__choices {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cp-postcontent .cp-auditions__choices > li {
    margin: 0.5rem 0;
    padding-left: 0;
}

.cp-postcontent .cp-auditions__choices > li::before {
    content: none !important;
}

.cp-postcontent .cp-auditions__choice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.cp-postcontent .cp-auditions__choice input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: auto !important;
    max-width: none !important;
}

/* Schedule conflict calendars (approach B) — THEME OVERRIDE */
.cp-postcontent .cp-conflict-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.65rem;
    background: #f7f4ef;
    border-radius: 6px;
    font-size: 0.8rem;
}

.cp-postcontent .cp-conflict-legend__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cp-postcontent .cp-conflict-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cp-postcontent .cp-conflict-legend__dot--rehearsal { background: #253a5b !important; }
.cp-postcontent .cp-conflict-legend__dot--setbuild { background: #2a4325 !important; }
.cp-postcontent .cp-conflict-legend__dot--tech { background: #ff9800 !important; }
.cp-postcontent .cp-conflict-legend__dot--performance { background: #741f11 !important; }

.cp-postcontent .cp-conflict-calendars {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cp-postcontent .cp-conflict-month {
    flex: 1 1 17rem;
    min-width: 16rem;
    max-width: 22rem;
    padding: 0.75rem;
    border: 1px solid #d4c4b8;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #faf8f5 100%);
}

.cp-postcontent .cp-conflict-month__title {
    margin: 0 0 0.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-align: center;
    color: #741f11 !important;
}

.cp-postcontent .cp-conflict-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 4px;
}

.cp-postcontent .cp-conflict-weekdays span {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    padding: 0.15rem 0;
    background: #f1eeea;
    border-radius: 3px;
}

.cp-postcontent .cp-conflict-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 0.82rem;
}

.cp-postcontent .cp-conflict-cell {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ece6df;
    border-radius: 6px;
    background: #fafafa;
    color: #bbb;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.cp-postcontent .cp-conflict-cell--empty {
    visibility: hidden;
    border-color: transparent !important;
    background: transparent !important;
}

.cp-postcontent .cp-auditions button.cp-conflict-cell--busy,
.cp-postcontent .cp-auditions .cp-conflict-cell--busy {
    cursor: pointer;
    color: #fff !important;
    font-weight: 600 !important;
    border-width: 2px !important;
    border-color: var(--cell-color, #ced4da) !important;
    background: var(--cell-color, #ced4da) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    min-height: 2rem !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cp-postcontent .cp-auditions button.cp-conflict-cell--busy:hover,
.cp-postcontent .cp-auditions button.cp-conflict-cell--busy:focus {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
    color: #fff !important;
    filter: brightness(0.92);
}

.cp-postcontent .cp-auditions button.cp-conflict-cell--busy.is-conflict,
.cp-postcontent .cp-auditions .cp-conflict-cell--busy.is-conflict {
    background: #c62828 !important;
    border-color: #c62828 !important;
    color: #fff !important;
    text-decoration: line-through;
    filter: none;
}

.cp-postcontent .cp-auditions .cp-conflict-cell--readonly {
    cursor: default !important;
    pointer-events: none;
}

.cp-postcontent .cp-auditions__role-signed {
    display: inline-block;
    margin-right: 0.2rem;
    color: #2e7d32 !important;
    font-size: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: -0.15em;
}

.cp-postcontent .cp-auditions__section--pieces-empty .cp-auditions__pieces-empty-note {
    margin: 0;
}

/* Potential members modal (calendar-style) */
.cp-potential-members-modal {
    display: none;
    position: fixed;
    z-index: 1000001;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
    box-sizing: border-box;
}

.cp-potential-members-modal.is-active {
    display: flex;
}

.cp-potential-members-modal__panel {
    position: relative;
    width: 92%;
    max-width: 430px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    margin: auto;
    border-radius: 8px;
    background: #e3e3e3;
    box-shadow: 0 8px 28px rgba(61, 35, 20, 0.25);
    font-family: Arial, 'Arial Unicode MS', Helvetica, Sans-Serif;
}

.cp-potential-members-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px 8px 0 0;
    background: #741f11;
    color: #fff;
}

.cp-potential-members-modal__header h3 {
    margin: 0 !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.cp-potential-members-modal__close {
    margin: 0 !important;
    padding: 0 0.35rem !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    border: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 1.65rem !important;
    line-height: 1 !important;
    cursor: pointer;
}

.cp-potential-members-modal__body {
    padding: 0.85rem;
    background: linear-gradient(180deg, #f5f8fc 0%, #eef2f6 100%);
}

.cp-potential-members-modal__field {
    margin: 0 0 0.55rem !important;
}

.cp-potential-members-modal__field label {
    display: block;
    margin: 0 0 0.2rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #3d2314 !important;
}

.cp-potential-members-modal__field input[type="text"],
.cp-potential-members-modal__field input[type="email"],
.cp-potential-members-modal__field input[type="tel"],
.cp-potential-members-modal__field input[type="date"],
.cp-potential-members-modal__field textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 2.5rem !important;
    padding: 0.45rem 0.65rem !important;
    font-size: 1rem !important;
    border: 1px solid #c4b5a8 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #3d2314 !important;
}

.cp-potential-members-modal__notes {
    min-height: calc(0.9rem + (1.4em * 5)) !important;
    resize: vertical;
    line-height: 1.4 !important;
}

.cp-potential-members-modal__date-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.4rem;
}

.cp-potential-members-modal__date-input {
    flex: 1 1 8rem;
    min-width: 0;
    margin: 0 !important;
}

.cp-potential-members-modal__date-calendar,
.cp-potential-members-modal__date-today {
    margin: 0 !important;
    min-height: 2.5rem !important;
    height: auto !important;
    padding: 0.45rem 0.65rem !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer;
    box-sizing: border-box !important;
    background-image: none !important;
}

.cp-potential-members-modal__date-calendar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.5rem !important;
    min-width: 2.5rem !important;
    padding: 0 !important;
    border: 1px solid #c4b5a8 !important;
    background: #fff !important;
    color: #3d2314 !important;
    box-shadow: 0 1px 3px rgba(61, 35, 20, 0.1) !important;
}

.cp-potential-members-modal__date-calendar:hover,
.cp-potential-members-modal__date-calendar:focus {
    border-color: #741f11 !important;
    background: #fff8f0 !important;
}

.cp-potential-members-modal__date-today {
    width: auto !important;
    border: 1px solid #c4b5a8 !important;
    background: #fff !important;
    color: #3d2314 !important;
    box-shadow: none !important;
}

.cp-potential-members-modal__date-today:hover,
.cp-potential-members-modal__date-today:focus {
    border-color: #741f11 !important;
    background: #fff8f0 !important;
    color: #741f11 !important;
}

.cp-potential-members-modal__feedback[hidden],
.cp-potential-members-modal__menu.is-hidden,
.cp-potential-members-modal__menu-dropdown.is-hidden {
    display: none !important;
}

.cp-potential-members-modal__feedback {
    margin: 0 0 0.65rem;
}

.cp-potential-members-modal__error {
    margin: 0 !important;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    border-left: 4px solid #741f11;
    background: #ffebee;
    color: #741f11 !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.cp-potential-members-modal__existing {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0.45rem 0 0 0.65rem !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    border: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #741f11 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: left !important;
    text-decoration: underline !important;
    cursor: pointer;
}

.cp-potential-members-modal__footer {
    padding: 0.65rem 0.85rem 0.85rem;
    background: #e3e3e3;
    border-radius: 0 0 8px 8px;
}

.cp-potential-members-modal__actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.cp-potential-members-modal__save,
.cp-potential-members-modal__menu-toggle {
    margin: 0 !important;
    min-height: 2.75rem !important;
    height: auto !important;
    box-sizing: border-box !important;
    border: 1px solid #5a180d !important;
    border-radius: 6px !important;
    background: #741f11 !important;
    background-image: none !important;
    box-shadow: 0 2px 6px rgba(61, 35, 20, 0.2) !important;
    color: #fff !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cp-potential-members-modal__save:hover,
.cp-potential-members-modal__save:focus,
.cp-potential-members-modal__menu-toggle:hover,
.cp-potential-members-modal__menu-toggle:focus {
    background: #5a180d !important;
    background-image: none !important;
    color: #fff !important;
    filter: none !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(61, 35, 20, 0.32) !important;
}

.cp-potential-members-modal__save:active,
.cp-potential-members-modal__menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(61, 35, 20, 0.2) !important;
}

.cp-potential-members-modal__save {
    flex: 1 1 auto;
    padding: 0.55rem 1rem !important;
    width: auto !important;
    max-width: none !important;
    font-size: 1rem !important;
}

.cp-potential-members-modal__save:disabled {
    opacity: 0.55 !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(61, 35, 20, 0.2) !important;
}

.cp-potential-members-modal__menu {
    position: relative;
    flex-shrink: 0;
}

.cp-potential-members-modal__menu-toggle {
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    max-width: 2.75rem !important;
    padding: 0 !important;
}

.cp-potential-members-modal__menu-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.cp-potential-members-modal__menu-dropdown {
    position: absolute;
    right: 0;
    bottom: calc(100% + 4px);
    z-index: 2;
    min-width: 9.5rem;
    padding: 0.25rem 0;
    border: 1px solid #e0d5c8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(61, 35, 20, 0.18);
}

.cp-potential-members-modal__menu-delete {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0.55rem 0.85rem !important;
    min-height: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #b32d2e !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-align: left !important;
    cursor: pointer;
}

.cp-potential-members-modal__menu-delete:hover,
.cp-potential-members-modal__menu-delete:focus {
    background: #fcf0f1 !important;
    color: #8a2424 !important;
}

.cp-postcontent .cp-audition-register__source-badge,
.cp-audition-register-modal .cp-audition-register__source-badge {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700 !important;
    line-height: 1.25;
    white-space: nowrap;
}

.cp-postcontent .cp-audition-register__source-badge--potential_members,
.cp-audition-register-modal .cp-audition-register__source-badge--potential_members {
    background: #e3f2fd !important;
    color: #0d47a1 !important;
}

.cp-postcontent .cp-audition-register__source-badge--walk_in_register,
.cp-audition-register-modal .cp-audition-register__source-badge--walk_in_register {
    background: #fff3e0 !important;
    color: #e65100 !important;
}

.cp-postcontent .cp-audition-register__source-badge--qr_signup,
.cp-audition-register-modal .cp-audition-register__source-badge--qr_signup,
.cp-postcontent .cp-audition-register__source-badge--qr_signup_venue,
.cp-audition-register-modal .cp-audition-register__source-badge--qr_signup_venue,
.cp-postcontent .cp-audition-register__source-badge--qr_signup_web,
.cp-audition-register-modal .cp-audition-register__source-badge--qr_signup_web {
    background: #f3e5f5 !important;
    color: #6a1b9a !important;
}

.cp-postcontent .cp-audition-register__source-badge--unknown,
.cp-audition-register-modal .cp-audition-register__source-badge--unknown {
    background: #f5f0ea !important;
    color: #5e5e5e !important;
}

/* Register walk-in + potential members — shared mobile list cards (≤767px) */
@media screen and (max-width: 767px) {
    .cp-postcontent:has(.cp-audition-register),
    .cp-postcontent:has(.cp-potential-members) {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }

    .cp-postcontent .cp-audition-register__list-head,
    .cp-postcontent .cp-potential-members__list-head {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.4rem 0.5rem;
    }

    .cp-postcontent .cp-audition-register__count,
    .cp-postcontent .cp-potential-members__count {
        grid-area: count;
        align-self: center;
    }

    .cp-postcontent .cp-audition-register__list-actions,
    .cp-postcontent .cp-potential-members__list-actions {
        display: contents;
    }

    .cp-postcontent .cp-audition-register__add,
    .cp-postcontent .cp-potential-members__add {
        grid-area: add;
        justify-self: end;
        width: auto !important;
        padding: 0.38rem 0.7rem !important;
        font-size: 0.85rem !important;
    }

    .cp-postcontent .cp-audition-register__table-wrap,
    .cp-postcontent .cp-potential-members__table-wrap {
        overflow: visible;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .cp-postcontent .cp-audition-register__table thead,
    .cp-postcontent .cp-potential-members__table thead {
        display: none !important;
    }

    .cp-postcontent .cp-audition-register__table,
    .cp-postcontent .cp-audition-register__table tbody,
    .cp-postcontent .cp-potential-members__table,
    .cp-postcontent .cp-potential-members__table tbody {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .cp-postcontent .cp-audition-register__table tbody,
    .cp-postcontent .cp-potential-members__table tbody {
        display: flex !important;
        flex-direction: column;
        gap: 0.55rem;
    }

    .cp-postcontent .cp-audition-register__table tr,
    .cp-postcontent .cp-potential-members__table tr {
        display: block !important;
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        padding: 0.7rem 0.4rem 0.5rem;
        border: 1px solid #e4d8cc !important;
        border-radius: 8px;
        background: #fffefb;
        box-shadow: 0 1px 4px rgba(61, 35, 20, 0.06);
        box-sizing: border-box;
    }

    .cp-postcontent .cp-audition-register__table tr.is-active,
    .cp-postcontent .cp-potential-members__table tr.is-active {
        border-color: #c4b5a8 !important;
        background: #fff8f0;
    }

    .cp-postcontent .cp-audition-register__table td,
    .cp-postcontent .cp-potential-members__table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        border-bottom: 0 !important;
        padding: 0.45rem 0 0.55rem !important;
        text-align: left !important;
    }

    .cp-postcontent .cp-audition-register__table td::before,
    .cp-postcontent .cp-potential-members__table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.72rem;
        font-weight: 700 !important;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #741f11 !important;
        line-height: 1.3;
    }

    .cp-postcontent .cp-audition-register__table .cp-audition-register__cell-name,
    .cp-postcontent .cp-potential-members__table .cp-potential-members__cell-name {
        padding-top: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 0.55rem !important;
        margin-bottom: 0.15rem;
        border-bottom: 1px solid #ebe4dc;
        font-size: 1.05rem;
    }

    .cp-postcontent .cp-audition-register__person,
    .cp-postcontent .cp-potential-members__person {
        position: relative;
        padding-right: 0;
    }

    .cp-postcontent .cp-audition-register__person-tools,
    .cp-postcontent .cp-potential-members__person-tools {
        position: absolute;
        top: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.35rem;
    }

    .cp-postcontent .cp-audition-register__person-main,
    .cp-postcontent .cp-potential-members__person-main {
        padding-right: 5.5rem;
    }

    .cp-postcontent .cp-audition-register__edit-btn,
    .cp-postcontent .cp-potential-members__edit-btn {
        width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .cp-postcontent .cp-audition-register__table .cp-audition-register__cell-name::before,
    .cp-postcontent .cp-audition-register__table .cp-audition-register__cell-email,
    .cp-postcontent .cp-potential-members__table .cp-potential-members__cell-name::before,
    .cp-postcontent .cp-potential-members__table .cp-potential-members__cell-email {
        display: none !important;
    }

    .cp-postcontent .cp-audition-register__email-under-name,
    .cp-postcontent .cp-potential-members__email-under-name {
        display: block;
        margin: 0.15rem 0 0.2rem !important;
        font-size: 0.9rem !important;
        font-weight: 400 !important;
        line-height: 1.3;
    }
}
