/* Overlay */
.brand-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.brand-picker-overlay.open {
    display: flex;
}

/* Container (Frame 6) */
.brand-picker {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 32px;
    isolation: isolate;
    width: 522px;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    background: #FFFFFF;
    box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    border-radius: 16px;
    position: relative;
}

.brand-picker .picker-header {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 30px;
    color: #344054;
}

/* Search area */
.brand-picker .picker-search {
    width: 100%;
}

.brand-picker .brand-search-input {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #111827;
}

.brand-picker .brand-search-input::placeholder {
    color: #9CA3AF;
}

.brand-picker .brand-search-input:focus {
    outline: none;
    border-color: #01294A;
    box-shadow: 0 0 0 3px rgba(1, 41, 74, 0.12);
}

.brand-picker .close-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    cursor: pointer;
}

.brand-picker .close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #344054;
}

/* Grid area (Frame 1171275590) */
.brand-picker .grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    overflow: auto;
    padding-right: 2px;
}

.brand-picker .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px 8px;
    color: #6B7280;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

/* Tile (Background+Border) */
.brand-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 96px;
    border: 0.54px solid #E9E9E9;
    border-radius: 8.5px;
    background: #FFFFFF;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-tile.selected {
    border-color: #01294A;
    box-shadow: 0 0 0 1px rgba(1, 41, 74, 0.1);
}

.brand-tile:hover,
.brand-tile:focus-visible {
    border-color: #01294A;
    box-shadow: 0 4px 8px rgba(16, 24, 40, 0.12);
    outline: none;
}

.brand-tile .radio {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid #D8D9D9;
    background: #FFFFFF;
    box-shadow: 0px 1.5px 2px rgba(17, 24, 39, 0.06);
}

.brand-tile.selected .radio {
    background: #01294A;
    border: 1.5px solid #0B3C40;
}

.brand-tile .radio::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: transparent;
}

.brand-tile.selected .radio::after {
    background: #F6F7F9;
}

.brand-logo-img {
    width: 53px;
    height: 53px;
    object-fit: contain;
}

.brand-initial {
    width: 53px;
    height: 53px;
    border-radius: 8px;
    background: #F3F4F6;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.brand-name {
    margin-top: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 10px;
    line-height: 12px;
    color: #050B20;
    text-align: center;
}

@media (max-width: 520px) {
    .brand-picker {
        width: 100%;
    }

    .brand-picker .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}