/* =========================================================
   GF Quote Helper — Speaker Selector field styles
   ========================================================= */

.ginput_container_speaker_selector {
    position: relative;
}

.gf-speaker-selector-wrapper {
    position: relative; /* dropdown positions relative to this */
}

/* =========================================================
   SUPPRESS GF field focus/error borders on our field
   ========================================================= */

.gfield:has(.gf-speaker-selector-wrapper),
.gfield:has(.gf-speaker-selector-wrapper):focus-within,
.gfield:has(.gf-speaker-selector-wrapper).gfield_error {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* =========================================================
   CHIPS — geselecteerde sprekers
   ========================================================= */

.gf-speaker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 4px;
}

.gf-speaker-chip {
    display: inline-flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, #d4b57a 0%, #b8955a 100%) !important;
    color: #fff !important;
    padding: 10px 10px 10px 18px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(184,149,90,0.4) !important;
    gap: 0 !important;
    letter-spacing: 0.01em !important;
}

/* × remove button — override ALL GF/WP button defaults */
.gf-speaker-selector-wrapper .gf-speaker-chip-remove,
.gform_wrapper .gf-speaker-chip-remove,
.gf-speaker-chip .gf-speaker-chip-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin-left: 10px !important;
    padding: 0 !important;
    background: rgba(0,0,0,0.18) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
    font-family: Arial, sans-serif !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
}

.gf-speaker-selector-wrapper .gf-speaker-chip-remove:hover,
.gf-speaker-selector-wrapper .gf-speaker-chip-remove:focus {
    background: rgba(0,0,0,0.35) !important;
    outline: none !important;
}

/* =========================================================
   SEARCH INPUT — pill shape
   ========================================================= */

.gf-speaker-search-wrap {
    /* Dropdown is now a sibling — overflow:hidden is safe here */
    display: flex !important;
    align-items: center !important;
    border-radius: 999px !important;
    border: 1.5px solid #d0d0d0 !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.09) !important;
    overflow: hidden !important;
    margin-top: 12px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gf-speaker-search-wrap:focus-within {
    border-color: #c8a96e !important;
    box-shadow: 0 2px 14px rgba(200,169,110,0.22) !important;
}

/* Input: no border/radius/shadow — those come from the wrapper. */
.gform_wrapper .gf-speaker-search-wrap .gf-speaker-search-input,
.gf-speaker-search-wrap .gf-speaker-search-input,
.gf-speaker-search-input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
    padding: 13px 12px 13px 22px !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit !important;
    color: #222 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Kill ALL focus states on the input — wrapper handles it */
.gform_wrapper .gf-speaker-search-wrap .gf-speaker-search-input:focus,
.gf-speaker-search-wrap .gf-speaker-search-input:focus,
.gf-speaker-search-input:focus,
.gform_wrapper .gf-speaker-search-wrap .gf-speaker-search-input:focus-visible,
.gf-speaker-search-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    border-color: transparent !important;
    background: transparent !important;
}

.gf-speaker-search-input::placeholder {
    color: #bbb !important;
}

.gf-speaker-search-input:disabled {
    background: transparent !important;
    color: #aaa !important;
    cursor: not-allowed !important;
}

/* Gold circle search icon — background-image approach, no SVG child needed */
.gf-speaker-search-icon {
    display: block !important;
    width: 37px !important;
    height: 37px !important;
    min-width: 37px !important;
    margin: 5px 5px 5px 0 !important; /* 5+37+5 = 47px = wrapper height */
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
    order: 2 !important;
    background-color: #c8a96e !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px 16px !important;
}

/* =========================================================
   DROPDOWN CARD
   ========================================================= */

.gf-speaker-dropdown {
    position: absolute;
    top: calc(100% + 6px); /* relative to .gf-speaker-selector-wrapper */
    left: 0;
    right: 0;
    z-index: 99999;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: 1px solid #e8e8e8;
    border-top: 3px solid #c8a96e;
    border-radius: 6px;
    max-height: 380px;
    overflow-y: auto;
    box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}

/* =========================================================
   DROPDOWN ITEMS
   ========================================================= */

.gf-speaker-dropdown-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    cursor: pointer !important;
    transition: background 0.12s !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background: #fff !important;
    text-decoration: none !important;
}

.gf-speaker-dropdown-item:last-child {
    border-bottom: none !important;
}

.gf-speaker-dropdown-item:hover,
.gf-speaker-dropdown-item:focus {
    background: #fdf9f3 !important;
    outline: none !important;
}

/* Img wrapper — fixed box, clips the img regardless of theme's height:auto */
.gf-speaker-dropdown-img-wrap {
    display: block !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    background: #eee !important;
}

.gf-speaker-dropdown-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: 0 !important;
}

/* Initials avatar — fills the img-wrap */
.gf-speaker-dropdown-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    background: #f0e8d8 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #c8a96e !important;
    font-family: inherit !important;
    letter-spacing: 0 !important;
}

/* Info column */
.gf-speaker-dropdown-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.gf-speaker-dropdown-name {
    display: block !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #111 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: inherit !important;
}

.gf-speaker-dropdown-title {
    display: block !important;
    font-size: 12px !important;
    color: #999 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: inherit !important;
    font-weight: 400 !important;
}

/* Gold + button — circle */
.gf-speaker-dropdown-add {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    background: #c8a96e !important;
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s !important;
    user-select: none !important;
    font-family: Arial, sans-serif !important;
    box-shadow: 0 2px 8px rgba(200,169,110,0.35) !important;
    align-self: center !important;
}

.gf-speaker-dropdown-item:hover .gf-speaker-dropdown-add {
    background: #a8843e !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(168,132,62,0.45) !important;
}

/* Hidden items (shown after "Toon meer" click) */
.gf-speaker-dropdown-item--hidden {
    display: none !important;
}

/* Toon meer / Toon minder toggle row */
.gf-speaker-dropdown-toggle {
    display: block !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #c8a96e !important;
    text-align: center !important;
    cursor: pointer !important;
    border-top: 2px solid #f0e8d8 !important;
    background: #fdf9f3 !important;
    transition: background 0.12s, color 0.12s !important;
    user-select: none !important;
    font-family: inherit !important;
    letter-spacing: 0.01em !important;
}

.gf-speaker-dropdown-toggle:hover,
.gf-speaker-dropdown-toggle:focus {
    background: #f5eddf !important;
    color: #a8843e !important;
    outline: none !important;
}

/* No results */
.gf-speaker-dropdown-empty {
    padding: 16px !important;
    font-size: 13px !important;
    color: #666 !important;
    font-style: italic !important;
    text-align: center !important;
    line-height: 1.5 !important;
}

.gf-speaker-dropdown-empty a {
    color: #c8a96e !important;
    text-decoration: underline !important;
    font-style: normal !important;
}
