﻿.email-component {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px; 
    width: 100%;
    box-sizing: border-box; /* Include padding and border in element's total width */
    position: relative; /* Needed for absolute positioning of the dropdown */
    font-size: 0.9em;
    margin-bottom: 2px;
}

/* Style for the "To" box */
.to-box {
    flex-shrink: 0; /* Prevent shrinking */
    border-radius: 3px;
    padding: 4px 8px;
    margin-right: 8px;
    font-weight: bold;
    cursor: pointer;
    align-self: center; /* Vertically center "To" box */
    user-select: none; /* Prevent text selection */
    min-width: 55px;
    text-align: center;
}

/* Container for the email pills and the input field */
.email-input-area {
    flex-grow: 1; /* Allow it to take up available space */
    display: flex;
    flex-wrap: wrap; /* Allow pills to wrap to the next line */
    align-items: center; /* Vertically align pills and input */
    padding-top: 1px; /* Adjust padding to align with "To" box */
    padding-bottom: 1px;
}

/* Style for individual email pills */
.email-pill {
    background-color: #e0e0e0; /* Gray background */
    color: #333; /* Dark text color */
    border-radius: 15px; /* Oval shape */
    padding: 4px 10px;
    margin-right: 6px; /* Space between pills */
    margin-bottom: 2px; /* Space below pills when wrapping */
    display: inline-flex; /* Allows better vertical alignment if needed */
    align-items: center;
    user-select: none; /* Prevent text selection */
    font-size: 0.9em;
}

/* Style for the input field itself */
.email-input {
    flex-grow: 1; /* Allows the input to take up remaining space */
    border: none;
    outline: none; /* Remove default focus outline */
    padding: 1px 0; /* Adjust padding to align with pills */
    margin-bottom: 2px; /* Align baseline with pills */
    min-width: 100px; /* Ensure input is visible even with many pills */
}

/* Style for the dropdown */
.email-dropdown {
    position: absolute;
    top: 100%; /* Position below the email component */
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    background-color: #fff;
    z-index: 510; /* Ensure it's above other content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none; /* Hide by default */
    max-height: 200px; /* Limit dropdown height */
    overflow-y: auto; /* Add scrollbar if needed */
    border-radius: 0 0 4px 4px; /* Rounded corners at the bottom */
}

/* Style for individual dropdown items */
.dropdown-item {
    padding: 8px 10px;
    cursor: pointer;
}

    .dropdown-item:hover {
        background-color: #f0f0f0;
    }
