#agencies-cont md-radio-button {
    margin-top: 0px;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
}

#agencies-cont md-radio-button .md-label {
    display: block !important;
    width: auto !important;
    max-width: calc(100% - 30px);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    white-space: normal;
    pointer-events: auto;
}

#agencies-cont .agency-select-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#agencies-cont .agency-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 3.25rem;
    width: 3.25rem;
    min-width: 3.25rem;
    max-width: 3.25rem;
    box-sizing: border-box;
    padding: 0 4px;
    border-radius: 3px;
    background: #e8eaed;
    color: #424242;
    font-size: 11px;
    font-weight: 600;
    font-family: "Roboto Mono", "SFMono-Regular", Menlo, Consolas, monospace;
    line-height: 18px;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#agencies-cont .publishEverywhere .agency-code-badge {
    background: #fce4ec;
    color: #ca064d;
}

#agencies-cont .agency-select-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

#agencies-cont .agency-select-name-wrap {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

#agencies-cont .agency-select-name-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 4px;
    width: 28px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 75%);
    pointer-events: none;
    z-index: 1;
}

#agencies-cont .agency-select-name {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    line-height: 1.35;
    padding-right: 28px;
    padding-bottom: 2px;
    pointer-events: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.06);
}

#agencies-cont .agency-select-name::-webkit-scrollbar {
    height: 4px;
}

#agencies-cont .agency-select-name::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

#agencies-cont .agency-select-name::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
}

#agencies-cont .agency-select-name::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

#agencies-cont .agency-select-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 100%;
}

#agencies-cont .agency-tag {
    display: inline-block;
    background: #fff9c4;
    color: #5d4037;
    border: 1px solid #d4c478;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

#agencies-cont #agencies-wrapper {
    width: 700px;
    max-width: 100%;
    overflow: hidden;
}

#agencies-cont #agencies-wrapper md-radio-button {
    display: inline-block;
    width: 350px;
    max-width: 350px;
    overflow: hidden;
    vertical-align: top;
    box-sizing: border-box;
    padding-right: 8px;
}

#agencies-cont #agencies-wrapper md-radio-button .md-label {
    max-width: calc(350px - 38px);
}

@media (max-width: 959px) {
    #agencies-cont #agencies-wrapper {
        width: auto;
    }

    #agencies-cont #agencies-wrapper md-radio-button {
        width: 50%;
        min-width: 150px;
        max-width: 50%;
    }

    #agencies-cont #agencies-wrapper md-radio-button .md-label {
        max-width: calc(100% - 30px);
    }
}

.custom-fields-container {
    margin-top: 10px;
}

.custom-fields-count {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
    display: inline-block;
    margin-bottom: 10px;
}

.custom-field-item {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.custom-field-item:hover {
    background-color: #f1f3f4;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-field-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
}

.custom-field-name {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: capitalize;
}

.custom-field-type {
    margin-left: 8px;
    font-size: 11px;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.custom-field-value {
    margin-top: 6px;
}

.value-text {
    color: #212529;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.json-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: auto;
}
