/* === API Selector Button and Modal Styles === */

/* The new button next to the input field */
#api-selector-button {
    background: none;
    border: none;
    font-size: 1.5em; /* Make it similar to other action buttons */
    cursor: pointer;
    padding: 0 8px;
    color: #888;
    transition: color 0.3s;
}

#api-selector-button:hover {
    color: #fff;
}

#api-selector-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Modal styles (reusing some from the main modal styles for consistency) */
.api-selector-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1001; /* Above other content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Dim background */
    -webkit-animation: fadeIn 0.3s;
    animation: fadeIn 0.3s;
}

.api-selector-modal-content {
    background-color: #2c2f33; /* Dark theme content background */
    color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    text-align: center;
}

.api-selector-modal-content h2 {
    margin-top: 0;
    color: #7289da; /* Discord-like purple */
}

.api-selector-modal-content label {
    display: block;
    margin-bottom: 10px;
}

.api-selector-modal-content select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #40444b; /* Darker input background */
    color: #fff;
    font-size: 1em;
}

.api-selector-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.api-selector-close-button:hover,
.api-selector-close-button:focus {
    color: #fff;
    text-decoration: none;
}

/* Style for the notice paragraph in the modal */
#vip-only-notice {
    font-size: 0.8em;
    color: #999; /* Default non-intrusive color for VIP users */
    margin-top: 15px;
    transition: color 0.3s ease;
}

/* Gold color for the locked notice for non-VIPs */
#vip-only-notice.vip-locked {
    color: gold;
    font-weight: bold;
}

/* Toast Notification for saving */
.api-selector-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #7289da;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    z-index: 1002; /* Above modal */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s, bottom 0.5s;
    font-size: 0.9em;
}

.api-selector-toast.show {
    opacity: 1;
    visibility: visible;
    bottom: 50px;
}

.api-selector-toast.error {
    background-color: #d9534f; /* Red for errors */
}
