
/* ============================================================================
   BENJFORUM - SEND MESSAGE FORM DARK MODE FIX
   Ultra-aggressive override for send_message.html
   ============================================================================ */

/* Target the exact card structure from send_message.html */
html[data-theme="dark"] body,
body[data-theme="dark"],
html[data-theme="dark"],
:root[data-theme="dark"] {

    /* Main card container */
    .card,
    .card * {
        background-color: #1c2733 !important;
        background: #1c2733 !important;
        border-color: #2d4050 !important;
    }

    /* Card header */
    .card-header,
    .card-header * {
        background-color: #15202b !important;
        background: #15202b !important;
        color: #e8eef4 !important;
        border-bottom-color: #2d4050 !important;
    }

    .card-header h4,
    .card-header h4 * {
        color: #e8eef4 !important;
    }

    /* Card body */
    .card-body,
    .card-body * {
        background-color: #1c2733 !important;
        background: #1c2733 !important;
    }

    /* Form inputs - using Bootstrap classes */
    .form-control,
    input.form-control,
    textarea.form-control,
    #recipientInput,
    #messageBody,
    input[type="text"],
    input[type="password"],
    input[type="email"],
    textarea {
        background-color: #1e2d3d !important;
        background: #1e2d3d !important;
        border: 1px solid #2d4050 !important;
        color: #e8eef4 !important;
        caret-color: #e8eef4 !important;
    }

    .form-control::placeholder,
    input::placeholder,
    textarea::placeholder {
        color: #6b7c8c !important;
        opacity: 1 !important;
    }

    .form-control:focus,
    #recipientInput:focus,
    #messageBody:focus {
        background-color: #243342 !important;
        border-color: #D4AF37 !important;
        box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.2) !important;
        color: #e8eef4 !important;
    }

    /* Form labels */
    .form-label,
    label,
    .col-form-label {
        color: #a8b5c4 !important;
        font-weight: 500 !important;
    }

    /* Primary button */
    .btn-primary,
    #submitBtn,
    button[type="submit"] {
        background: linear-gradient(135deg, #D4AF37, #b8962e) !important;
        border: none !important;
        color: #1c2733 !important;
        font-weight: 600 !important;
    }

    .btn-primary:hover,
    #submitBtn:hover {
        background: linear-gradient(135deg, #e5c04b, #c9a73d) !important;
        color: #1c2733 !important;
    }

    /* Secondary button */
    .btn-outline-secondary,
    .btn-outline-secondary:visited {
        background: transparent !important;
        border: 1px solid #2d4050 !important;
        color: #a8b5c4 !important;
    }

    .btn-outline-secondary:hover {
        background: #2d4050 !important;
        color: #e8eef4 !important;
    }

    /* Error messages */
    .text-danger,
    .text-danger * {
        color: #f87171 !important;
    }

    /* Search results dropdown */
    .recipient-search-results,
    .recipient-search-results * {
        background-color: #1c2733 !important;
        border-color: #2d4050 !important;
        color: #e8eef4 !important;
    }

    .recipient-search-item,
    .recipient-search-item * {
        background-color: #1c2733 !important;
        color: #e8eef4 !important;
    }

    .recipient-search-item:hover {
        background-color: #2d4050 !important;
    }

    /* Page background override */
    .row,
    .row * {
        background-color: #0f151c !important;
    }

    .col-md-8,
    .col-md-8 * {
        background-color: transparent !important;
    }
}

/* Additional overrides for any white backgrounds */
[data-theme="dark"] * {
    border-color: #2d4050 !important;
}

/* Force override inline styles */
html[data-theme="dark"] [style*="background"],
body[data-theme="dark"] [style*="background"] {
    background-color: #1c2733 !important;
}

/* Text colors */
html[data-theme="dark"],
body[data-theme="dark"] {
    background-color: #0f151c;
    color: #e8eef4;
}

/* Links */
html[data-theme="dark"] a,
body[data-theme="dark"] a {
    color: #D4AF37 !important;
}

html[data-theme="dark"] a:hover,
body[data-theme="dark"] a:hover {
    color: #e5c04b !important;
}
