/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/*Contact Form*/
.bp-contact-me-list,
.bp-contact-me-ul {
    list-style-type: none;
}

.bp-content-me-container h3 {
    margin-bottom: 15px;
    line-height: 1;
}

.bp-content-me-container form.bp-contact-me-form .bp-content-me-fieldset {
    margin-bottom: 15px;
}

.bp-content-me-fieldset input[type=email],
.bp-content-me-fieldset input[type=text],
.bp-content-me-fieldset textarea {
    font-size: 15px;
    padding: 5px 15px;
    height: 42px;
    border-radius: 8px;
    width: 100%;
    display: block;
}

.bp-content-me-fieldset textarea {
    font-size: 15px;
    height: 120px;
    line-height: 1.6;
}

form.bp-contact-me-form .bp-content-me-fieldset label,
form.bp-contact-me-form .bp-content-me-fieldset .captchasum {
    margin-bottom: 5px;
    display: block;
    font-size: 15px;
}

form.bp-contact-me-form .bp-content-me-fieldset label span {
    color: red;
}

div#fieldset-captchasum .captchasum {
    display: inline-block;
    background: #eee;
    padding: 6px 10px;
    font-weight: bold;
    margin-bottom: 10px;
    border-radius: 5px;
    min-height: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

form.bp-contact-me-form .bp-contact-me-btn[type="submit"] {
    margin: 5px 0 0;
    font-size: 16px;
    padding: 10px 25px;
    border-radius: 8px;
}

/* NEW: Form Validation & UI Styles */

/* Form field descriptions */
.bp-contact-me-form .bcm-field-description,
.bp-member-blog-post-form .bcm-field-description {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Character counter */
.bp-contact-me-form .bcm-char-count,
.bp-member-blog-post-form .bcm-char-count {
    float: right;
    font-weight: bold;
    color: #666;
}

.bp-contact-me-form .bcm-char-count.bcm-warning,
.bp-member-blog-post-form .bcm-char-count.bcm-warning {
    color: #ff6b6b;
}

/* Error states for form fields */
.bp-contact-me-form input.bcm-error,
.bp-contact-me-form textarea.bcm-error,
.bp-member-blog-post-form input.bcm-error,
.bp-member-blog-post-form textarea.bcm-error {
    border-color: #ff6b6b !important;
    background-color: #fff5f5;
}

/* Error messages */
.bp-contact-me-form .bcm-error-message,
.bp-member-blog-post-form .bcm-error-message {
    display: block;
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    font-weight: normal;
}

/* Captcha wrapper improvements */
.bp-contact-me-form .captcha-wrapper,
.bp-member-blog-post-form .captcha-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
}

.bp-contact-me-form .captcha-wrapper .captchasum,
.bp-member-blog-post-form .captcha-wrapper .captchasum {
    font-weight: bold;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 3px;
    min-width: 80px;
    text-align: center;
}

/* Submit button area */
.bp-contact-me-form .bp-content-me-submit,
.bp-member-blog-post-form .bp-content-me-submit {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-top: 20px;
}

/* Loading spinner */
.bp-contact-me-form .bcm-submit-spinner,
.bp-member-blog-post-form .bcm-submit-spinner {
    display: inline-block;
    margin-left: 10px;
}

/* Required field asterisk */
.bp-contact-me-form label .required,
.bp-member-blog-post-form label .required,
.bp-content-me-fieldset label .required {
    color: #ff0000;
    font-weight: bold;
    margin-left: 2px;
}

/* Input focus states */
.bp-contact-me-form input:focus,
.bp-contact-me-form textarea:focus,
.bp-member-blog-post-form input:focus,
.bp-member-blog-post-form textarea:focus {
    outline: none;
    border-color: #5b9dd9;
    box-shadow: 0 0 2px rgba(91, 157, 217, 0.3);
}

/* Responsive captcha */
@media (max-width: 480px) {

    .bp-contact-me-form .captcha-wrapper,
    .bp-member-blog-post-form .captcha-wrapper {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
    }

    .bp-contact-me-form .captcha-wrapper .captchasum,
    .bp-member-blog-post-form .captcha-wrapper .captchasum {
        margin-bottom: 10px;
    }
}

/*Contact Message*/
.bp-contact-me-loader {
    z-index: 999999;
    width: 100%;
    background: rgba(0, 0, 0, .4);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    height: 100%;
    padding: 0.625em;
    overflow-x: hidden;
    -webkit-transition: background-color .1s;
    transition: background-color .1s;
    overflow-y: auto;
}

.bp-contact-me-loader-img {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100%;
}

.bp-contact-me-loader img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.bp_contact-me-messages th,
.bp_contact-me-messages td {
    border: 1px solid #e3e3e3;
    padding: 10px !important;
    text-align: left;
}

.bp_contact-me-messages thead {
    background: #f8f8f8;
}

.bp_contact-me-messages th.contact-me-sender-id {
    width: 5%;
}

.bp_contact-me-messages th.contact-me-subject {
    width: 25%;
}

.bp_contact-me-messages th.contact-me-message {
    width: 60%;
}

.bp_contact-me-messages th.contact-me-btn {
    width: 10% !important;
}

.bp_contact-me-messages .user_displayname a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.buddypress .bp_contact-me-messages .avatar {
    width: 40px;
    border-radius: 100%;
    margin-right: 10px;
}

.bp_contact-me-messages .bcm-user-subject {
    font-weight: bold;
}

.bp_contact-me-messages .bcm-user-message,
.bp_contact-me-messages .bcm-user-subject {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.bp_contact-me-messages input.bcm-all-check,
.contact-me-sender-id input#bcm-select-all-contact {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.buddypress .bcm_action {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
}

.buddypress .bcm_action_btn {
    position: relative !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 5px;
    background: transparent !important;
}

.bcm_action_btn .bcm-tooltip-text {
    white-space: nowrap;
    position: absolute;
    z-index: 99;
    top: -30px;
    left: 50%;
    margin-left: -55px;
    opacity: 0;
    padding: 8px 20px;
    border-radius: 100px;
    visibility: hidden;
    -webkit-transform: translate(0, 10px);
    -ms-transform: translate(0, 10px);
    transform: translate(0, 10px);
    -webkit-transition: all .3s ease-in-out 0s;
    transition: all .3s ease-in-out 0s;
    background: #3e3f5e;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.bcm_action_btn:hover .bcm-tooltip-text {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0);
}

.buddypress .bcm_action_btn span.dashicons.bcm_message_seen {
    color: #037dbf;
    font-size: 25px;
}

.buddypress .bcm_action_btn span.dashicons.bcm_message_delete {
    color: #ea0303;
    font-size: 25px;
}

.bcm_action_btn:hover span.dashicons {
    color: #3e3f5e !important;
}

body.wbcom-bp-contact div#item-body nav#subnav,
body.contact-me div#item-body nav#subnav {
    display: none;
}


/*Popup Message Details*/
body.wbcom-bp-contact.swal2-shown.swal2-height-auto .swal2-container.swal2-center>.swal2-popup {
    max-width: 700px;
    width: 100%;
    padding: 0;
    border-radius: 15px;
}

body.wbcom-bp-contact.swal2-shown.swal2-height-auto div#swal2-html-container {
    padding: 20px;
    margin: 0;
}

body.wbcom-bp-contact.swal2-shown.swal2-height-auto button.swal2-close {
    display: block !important;
    position: absolute;
    background: red;
    color: #fff;
    border-radius: 80px;
    width: 42px;
    top: -13px;
    height: 42px;
    line-height: 1;
    font-size: 28px;
    right: -13px;
    border: none;
}

body.wbcom-bp-contact.swal2-shown.swal2-height-auto button.swal2-close:focus {
    box-shadow: none !important;
}

body.wbcom-bp-contact.swal2-shown.swal2-height-auto .swal2-actions {
    display: none !important;
}

body.wbcom-bp-contact.swal2-shown.swal2-height-auto .bp-contact-me-popup-message {
    padding: 0 !important;
    margin: 0 !important;
}

body.wbcom-bp-contact .bp-contact-me-popup-message {
    padding: 0;
    margin: 0;
    border: 1px solid #eee;
    border-radius: 10px;
}

body.wbcom-bp-contact .bp-contact-me-popup-message li {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    font-size: 16px;
    padding: 15px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

body.wbcom-bp-contact .bp-contact-me-popup-message li:nth-child(2n+2) {
    background: #f4f4f4;
}

body.wbcom-bp-contact .bp-contact-me-popup-message li strong {
    width: 22%;
    min-width: 110px;
    text-align: left;
}

body.wbcom-bp-contact .bp-contact-me-popup-message li span {
    width: 78%;
    text-align: left;
}

.bp-contact-me-details table.bp_contact-me-messages tr:nth-child(2n+2) {
    background: #f8f8f8;
}

/*Profile Setting Tab*/
.enable-bp-contact-tab {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin: 20px 0;
    gap: 5px;
}

.enable-bp-contact-tab label {
    font-size: inherit;
    margin: 0 !important;
    font-weight: normal !important;
}

.enable-bp-contact-tab input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    border: 1px solid #a0a0a0;
    border-radius: 6px;
    background: #fff;
    clear: none;
    cursor: pointer;
    display: inline-block;
    line-height: 0;
    margin: 0;
    outline: 0;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
    position: relative;
    -webkit-appearance: none;
    box-shadow: none;
}

.enable-bp-contact-tab input[type=checkbox]:checked {
    background-color: #3583f4;
    border-color: #3583f4;
}

.enable-bp-contact-tab input[type=checkbox]:checked::before {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    content: "";
    position: absolute;
}

/* Pagination */
.bcm-pagination {
    margin: 15px 0;
    text-align: right;
}

.bcm-pagination .page-numbers {
    display: inline-block;
    min-width: 30px;
    min-height: 30px;
    margin: 3px;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 1.625;
    text-align: center;
    text-decoration: none;
    cursor: default;
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    white-space: nowrap;
    box-sizing: border-box;
    color: #a7aaad;
    border-color: #dcdcde;
    background: #f6f7f7;
    box-shadow: none;
    transform: none !important;
    -webkit-transform: none;
    -ms-transform: none;
}

.bcm-pagination .page-numbers.current,
.bcm-pagination .page-numbers:hover {
    color: #2271b1;
    border-color: #2271b1;
    background: #f6f7f7;
    vertical-align: top;
}

.bcm-pagination .page-numbers:hover {
    cursor: pointer;
}

/*Reign Theme Icon*/
.contact-me.buddypress .bp-member-blog-post-form {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px !important;
    background: #fff;
    margin-top: 10px;
}

table.bp_contact-me-messages {
    background: #fff;
}

.reign-nav-iconic .rg-nouveau-sidebar-menu a#user-contact:before {
    content: "\f658";
}

.reign-nav-iconic .rg-nouveau-sidebar-menu a#user-contact-me:before {
    content: "\f1d8";
}

.not-allowed {
    opacity: 0.6;
    cursor: not-allowed !important;
}

/* NEW: Disabled button state improvement */
.bp-contact-me-form .bp-contact-me-btn.not-allowed,
.bp-member-blog-post-form .bp-contact-me-btn.not-allowed {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.buddypress-wrap #bcm-bulk-manage[disabled],
.buddypress-wrap #bcm-bulk-manage[disabled] {
    display: none;
}

.reign-theme .bp-contact-me-details {
    margin-top: 15px;
}

/*BuddyX Theme*/
.theme-buddyx.contact-me.buddypress .bp-member-blog-post-form {
    padding: 0;
    border: none;
    border-radius: 0 !important;
    background: #fff;
    margin-top: 0;
}

.buddyx-nav-iconic .rg-nouveau-sidebar-menu a#user-contact:before {
    content: "\f658";
}

.buddyx-nav-iconic .rg-nouveau-sidebar-menu a#user-contact-me:before {
    content: "\f1d8";
}

/*******************
BB Theme
********************/

.bcm-contact-options-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px;
    float: left;
}

.bcm-contact-options-nav::after {
    content: '';
    display: table;
    clear: both;
}

.bcm-contact-options-nav .select-wrap {
    width: 200px;
}

.bcm-contact-options-nav .select-wrap select {
    width: 100%;
}

/*******************
    Youzify Plugin
********************/

.wbcom-bp-contact.youzify-active .youzify-page-main-content {
    position: unset;
}

.wbcom-bp-contact.youzify-active .bcm-contact-options-nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px;
}

.contact-me.youzify-active .bp-member-blog-post-form {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    margin-bottom: 50px;
}

.contact-me.youzify-active .bp-member-blog-post-form input.bp-contact-me-btn {
    cursor: pointer;
}

.theme-buddyx-pro .youzify-inner-content.settings-inner-content .youzify-section-content .enable-bp-contact-tab {
    padding: 25px 45px;
}

.youzify-inner-content.settings-inner-content .youzify-section-content .enable-bp-contact-tab {
    padding: 25px 45px;
}

.youzify-inner-content.settings-inner-content .youzify-section-content .enable-bp-contact-tab label {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    color: var(--yzfy-option-label-color);
    font-size: var(--yzfy-primary-font-size);
    font-weight: 600;
    margin-left: 5px !important;
}

.youzify-inner-content.settings-inner-content .youzify-section-content .enable-bp-contact-tab input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
}

.youzify-inner-content.settings-inner-content .youzify-section-content .enable-bp-contact-tab input[type=checkbox]:checked::before {
    left: 5px;
    top: 0px;
    width: 8px;
    height: 13px;
    border-width: 0 2px 2px 0;
}

/*Contact Message Table Mobile*/

@media only screen and (max-width: 768px) {

    .bp-contact-me-details table.bp_contact-me-messages thead,
    .bp-contact-me-details table.bp_contact-me-messages tbody,
    .bp-contact-me-details table.bp_contact-me-messages th,
    .bp-contact-me-details table.bp_contact-me-messages td,
    .bp-contact-me-details table.bp_contact-me-messages tr {
        display: block;
    }

    .bp-contact-me-details table.bp_contact-me-messages thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .bp-contact-me-details table.bp_contact-me-messages td {
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding-left: 40% !important;
    }

    .bp-contact-me-details table.bp_contact-me-messages td:before {
        content: attr(data-label);
        position: absolute;
        top: 10px;
        left: 12px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-transform: capitalize;
    }
}