/* BBCode Editor Toolbar Styles - Mercury Theme */

.bbcode-toolbar {
    border-bottom: none;
    padding: 5px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    border-radius: 3px 3px 0 0;
    width: 100%;
    margin-bottom: 5px !important;
    margin-top: 5px !important;
}

.bbcode-button {
    background-color: #303a43;
    border: 1px solid #565656;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #D4D4D4;
    border-radius: 2px;
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.bbcode-button:hover {
    background-color: #294b6c;
    border-color: #6b6b9c;
    color: #d3d67c;
}

.bbcode-button:active {
    background-color: #284f74;
    border-color: #062d52;
    color: #d3d67c;
}

.bbcode-separator {
    color: #565656;
    margin: 0 2px;
    font-size: 12px;
    user-select: none;
}

/* Ensure textarea has matching border style when toolbar is present */
.infldset.txtarea:has(.bbcode-toolbar) textarea[name="req_message"] {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}

/* Adjust label spacing if needed */
label:has(textarea[name="req_message"]) {
    display: block;
}

/* Container for label + toolbar + textarea */
.infldset.txtarea {
    position: relative;
}

/* Ensure toolbar appears right before textarea */
.bbcode-toolbar + textarea[name="req_message"] {
    margin-top: 0;
}

