/* Team-Hinweis: orange, Popup klappt nach unten auf */

.master-team-note {
    --mtn-accent: #e38722;
    --mtn-accent-dark: #c2410c;
    --mtn-bg: #fff7ed;
    --mtn-border: #e38722;
    font-family: inherit;
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: flex-start;
    vertical-align: top;
}

.master-team-note--artist,
.master-team-note--organizer {
    --mtn-accent: #e38722;
    --mtn-accent-dark: #c2410c;
    --mtn-bg: #fff7ed;
    --mtn-border: #e38722;
}

.master-team-note--icon,
.master-team-note--panel {
    position: relative;
}

.tender-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    overflow: visible;
}

.tender-title-row .tender-title,
.tender-title-row h1.tender-title,
.tender-title-row h3.tender-title,
.tender-title-row .event-title {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.tender-title-row .master-team-note {
    margin-top: 2px;
}

.master-team-note__toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: auto;
    min-width: 56px;
    min-height: auto;
    padding: 7px 10px 6px;
    margin: 0;
    border: 2px solid color-mix(in srgb, var(--mtn-accent) 55%, #fff);
    border-radius: 12px;
    background: var(--mtn-bg);
    cursor: pointer;
    font-family: inherit;
    color: var(--mtn-accent-dark);
    text-align: center;
    box-shadow: 0 2px 12px rgba(227, 135, 34, 0.32);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.master-team-note__toggle:hover {
    background: color-mix(in srgb, var(--mtn-bg) 70%, var(--mtn-accent) 30%);
    box-shadow: 0 4px 16px rgba(227, 135, 34, 0.42);
    transform: translateY(-1px);
}

.master-team-note__toggle:focus-visible {
    outline: 2px solid var(--mtn-accent);
    outline-offset: 2px;
}

.master-team-note.is-open .master-team-note__toggle {
    background: color-mix(in srgb, var(--mtn-bg) 55%, var(--mtn-accent) 45%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mtn-accent) 28%, transparent);
}

.master-team-note__caption {
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--mtn-accent-dark);
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.master-team-note__icon-svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--mtn-accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-team-note__icon-svg--envelope {
    width: 24px;
    height: 24px;
}

.master-team-note-modal-body {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: var(--mtn-bg, #fff7ed);
    border: 1px solid color-mix(in srgb, var(--mtn-accent, #e38722) 35%, #fff);
    border-left: 4px solid var(--mtn-accent, #e38722);
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    text-align: left;
}

#masterArtistTeamNoteModal .modal-buttons,
#masterOrganizerTeamNoteModal .modal-buttons {
    margin-top: 28px;
}

.master-team-note-modal-artist {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.master-team-note__badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mtn-accent);
    border: 2px solid #fff;
    pointer-events: none;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mtn-accent) 40%, transparent);
}

.master-team-note__panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    bottom: auto;
    right: 0;
    left: auto;
    z-index: 50;
    min-width: min(300px, calc(100vw - 40px));
    max-width: min(340px, calc(100vw - 32px));
    margin: 0;
    padding: 0;
    background: #fff;
    border: 2px solid var(--mtn-border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(227, 135, 34, 0.22);
    overflow: hidden;
}

.master-team-note.is-open .master-team-note__panel {
    display: block;
}

.master-team-note--flip-above .master-team-note__panel {
    top: auto;
    bottom: calc(100% + 10px);
}

.master-team-note__panel-head {
    padding: 10px 14px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    background: var(--mtn-accent);
    letter-spacing: 0.02em;
}

.master-team-note__panel-body {
    padding: 12px 14px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5563;
    max-height: min(240px, 45vh);
    overflow-y: auto;
}

.master-team-note__entry + .master-team-note__entry {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #fde8d0;
}

.master-team-note__entry-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--mtn-accent-dark);
    margin-bottom: 4px;
}

.master-team-note__entry-body {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    word-break: break-word;
}

.master-team-note--panel {
    width: auto;
    margin: 0;
}

.master-team-note--panel .master-team-note__label,
.master-team-note--panel .master-team-note__chevron {
    display: none;
}

.gig-item-inner,
.event-item-inner,
.tender-title-block,
.event-title-block,
.artist-card-meta-row__head {
    overflow: visible;
}
