/* =============================================================================
   Port Search Widget — Styles
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Wrapper — positions the dropdown relative to the input row
   ----------------------------------------------------------------------------- */

.psw-wrapper {
    position: relative;
    width: 100%;
    max-width: 50%;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Input row
   ----------------------------------------------------------------------------- */

.psw-input-group {
    display: flex;
    align-items: center;
    width: 100%;

    overflow: hidden;

    background: #fff;
}

.psw-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.5rem;
    color: #374151;
    background: transparent;
    min-width: 0;
    border: 1px solid var(--color-primary, #1d4ed8);
    border-radius: 9999px; /* pill shape */
}

.psw-input::placeholder {
    color: #9ca3af;
}

.psw-button {
    flex-shrink: 0;
    border: none;
    background-color: var(--color-primary, #1d4ed8);
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 9999px;
    margin: 3px;
    transition:
        background-color 0.15s ease,
        transform 0.1s ease;
    white-space: nowrap;
}

.psw-button:hover {
    background-color: #1e40af;
}

.psw-button:active {
    transform: scale(0.97);
}

/* -----------------------------------------------------------------------------
   Suggestions dropdown
   ----------------------------------------------------------------------------- */

.psw-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 200;
}

/* -----------------------------------------------------------------------------
   Suggestion item
   ----------------------------------------------------------------------------- */

.psw-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.1s ease;
    color: #374151;
}

.psw-suggestion-item:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

.psw-suggestion-item:hover,
.psw-suggestion-item--active {
    background-color: #eff6ff;
}

.psw-suggestion-icon {
    display: flex;
    align-items: center;
    color: var(--pf-color-primary, #1d4ed8);
    flex-shrink: 0;
}

.psw-suggestion-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.psw-suggestion-main {
    font-size: 1.5rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psw-suggestion-sub {
    font-size: 1rem;
    color: #6b7280;
}

.psw-suggestion-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    flex-shrink: 0;
}
