/* Add Font */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap');

/* Global styles for woosponder admin pages */
:root {
    --main: #0073E6;
    --main-light: #3b9dff;
    --main-dark: #0064c9;
    --white: #ffffff;
    --black: #000000;
    --gray-normal: #4d555f;
    --gray-dark: #3F4140;
    --gray-light: #777777;
    --gray-light-2: #929292;
}

body.toplevel_page_woosponder {
    background: #ffffff;
}

body.toplevel_page_woosponder #wpcontent {
    font-family: "Assistant", sans-serif;
    margin-right: 140px;
    background: #ffffff;
    padding-right: 40px;
}

body.toplevel_page_woosponder #wpbody {
    height: 100%;
}

body.toplevel_page_woosponder #wpbody-content {
    width: auto;
    height: 100%;
}

h1.woosponder-header {
    font-size: 32px;
    font-weight: 700;
    line-height: 28.5px;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.woosponder-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    direction: rtl;
    text-align: right;
    padding: 2rem;
    background: var(--white);
    color: var(--gray-normal);
}

/* Tab menu */
.woosponder-content h2.nav-tab-wrapper {
    border: none;
}

.woosponder-content .nav-tab {
    border: none;
    margin-right: .5em;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.71428571;
    font-weight: 600;
    background: #dcdcde;
    color: var(--gray-dark);
    text-decoration: none;
    white-space: nowrap;
}

.woosponder-content {
    margin: 10px 2px 0 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woosponder-content .nav-tab-active {
    background-color: #1d4b8f;
    /* Color for active tabs */
    border-bottom: 2px solid #f9f9f9;
    /* Same color as the tab content background */
    color: #ffffff;
    /* Text color for active tabs */
}

.woosponder-content #tab-content {
    padding-bottom: 2rem;
    background: var(--white);
}

.woosponder-wrap h1 {
    font-size: 5px;
}

.woosponder-wrap h2 {
    color: #333;
    margin-bottom: 10px;
}






/* Danik styles */

/* General styles */

body.toplevel_page_woosponder #wpcontent {
    padding-right: 20px;
    height: calc(100vh - 32px);

    &:dir(ltr) {
        padding-right: 0;
        margin-right: 0;
        padding-left: 0;
    }
}

body.toplevel_page_woosponder #wpbody-content {
    width: 100%;
}

#wpbody-content {
    padding-bottom: 0;
}

.woosponder-content {
    margin: 0;
    line-height: normal;
    zoom: 0.9;
}

.woosponder-wrap {

    input[type=checkbox]:checked::before {
        display: none;
    }

    .opacity-80 {
        opacity: 0.8;
    }

    .mb-8 {
        margin-bottom: 8px;
    }

    .mb-20 {
        margin-bottom: 20px;
    }
}

.rtl h1,
.wrap h1,
.woosponder-wrap h1 {
    font-family: "Assistant", sans-serif;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 32px;
    line-height: 89%;
    padding: 0;
}

/* .woosponder-sync-tab h2,
.small-heading h2, */
.woosponder-wrap h2 {
    font-weight: 700;
    font-size: 22px;
    color: var(--gray-normal);
    margin: 0;
    font-family: "Assistant", sans-serif;
}

/* .small-heading p, */
.woosponder-wrap p {
    margin: 0;
    font-size: 18px;
    line-height: normal;
}

.woosponder-wrap li {
    margin-bottom: 0;
}

.bold-text {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
    display: block;
}

.link {
    text-decoration-skip-ink: none;
    color: #0073e6;
}

.woosponder-wrap form {
    margin: 0;
}

.woosponder-wrap form label {
    font-weight: 700;
    font-size: 22px;
    color: var(--gray-normal);
    direction: rtl;
    display: block;
    margin-bottom: 15px;
    letter-spacing: 0.01em;
}

.woosponder-wrap form div.input-text-block {
    display: flex;
}

.woosponder-wrap form input[type="text"] {
    border: 1px solid rgba(63, 65, 64, 0.2);
    border-radius: 2px;
    padding: 10px;
    width: 100%;
    max-width: 641px;
    max-height: 44px;
    margin-left: 10px;
    background: rgba(216, 216, 216, 0.1);
    font-size: 18px;
}

.woosponder-wrap form input[type="submit"] {
    color: #fff;
    background-color: var(--main);
    padding: 10px 20px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    min-width: 123px;
    min-height: 44px;
    font-weight: 700;
    font-size: 18px;
    line-height: normal;
    transition: all 0.3s;
}
.woosponder-wrap form input[type="submit"]:active, .woosponder-wrap form input[type="submit"]:hover  {
    color: #fff;
    background-color: var(--main-light);
}
.sync-tab-edit-btn{
    cursor: pointer;
}

/* Header Danik */

.woosponder-content .page-header {
    display: flex;
    background-color: #f8f8f8;
    width: 100%;
}

.woosponder-content .header-wrap {
    margin: 2rem;
    margin-left: auto;
}

.woosponder-content .header-title {
    color: #333;
    text-align: right;
    letter-spacing: 0.02em;
}

.woosponder-content .nav-menu {
    display: flex;
    align-items: center;
    justify-content: right;
    direction: ltr;
}

.woosponder-content .nav-link {
    display: flex;
    font-weight: 500;
    font-size: 18px;
    color: var(--gray-normal);
    /* padding-bottom: 4px; */
    text-decoration: none;

    &:not(:first-child) {
        margin-left: 50px;
    }
}

.woosponder-content .nav-tab-active {
    background-color: unset;
    color: unset;
    border-bottom: unset;
}

.woosponder-content .nav-tab-active .nav-tab-text {
    padding-bottom: 4px;
    background-color: #f8f8f8;
    color: var(--gray-normal);
    border-bottom: 3px solid var(--main);
}

.woosponder-content .page-header .nav-icon {
    margin-left: 10px;
    min-width: 25px;
    min-height: 25px;
    background-repeat: no-repeat;
    background-size: contain;

    &.nav-icon-newsletter {
        background-image: url('icons/nav-icon-newsletter.svg');
    }

    &.nav-icon-lists {
        background-image: url('icons/nav-icon-lists.svg');
    }

    &.nav-icon-connection {
        background-image: url('icons/nav-icon-connection.svg');
    }

    &.nav-icon-debug {
        background-image: url('icons/nav-icon-debug.svg');
    }
}

/* Connection-tab Danik */

.woosponder-content .info {
    border-bottom: 2px solid #eee;
    padding-bottom: 27px;
    margin-bottom: 33px;
    max-width: 879px;
}

.woosponder-content .info-list {
    padding-right: 20px;
    font-size: 18px;
    margin: 0;
}

.woosponder-content .info-contacts {
    font-weight: 500;
    font-size: 16px;
}

/* Acceptance-tab Danik */

.woosponder-newsletter-settings form {
    max-width: 645px;
    font-size: 18px;
}

.wp-editor-wrap {
    margin-bottom: 20px;
    min-height: 223px;
}

.newsletter-form-checkbox {
    display: flex;
    align-items: center;
}

.woosponder-newsletter-settings form label {
    margin-right: 14px;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 18px;
}

.woosponder-newsletter-settings form input[type="checkbox"] {
    margin: 2px 0;
    width: 20px;
    height: 20px;
    border: 1px solid #458406;
    border-radius: 3px;

    &:checked {
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(179, 226, 134, 0.25);

        &::after {
            content: '';
            background-image: url('icons/newsletter-arrow-checkbox.svg');
            background-repeat: no-repeat;
            background-position: center;
            display: block;
            width: 15px;
            height: 12px;
        }
    }
}

/* Footer Danik */
body.toplevel_page_woosponder #wpfooter, body.toplevel_page_woosponder .update-nag{
    display: none;
}

.woosponder-content .page-footer {
    display: flex;
    background-color: #F8F8F8;
    padding-top: 15px;
    padding-bottom: 23px;
    justify-content: right;
    direction: ltr;
    padding-right: 2rem;
    padding-left: 20px;
    /*margin-top: auto;*/
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
}

.woosponder-content .footer-contacts {
    display: flex;
    align-items: center;
}

.woosponder-content .footer-link {
    color: var(--main);
    text-decoration-skip-ink: none;
}

.woosponder-content .footer-item {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-left: 34px;
    font-size: 16px;
}
.woosponder-content .work-time-info {
    color: var(--gray-light);
}

.footer-link.footer-phone{
    text-decoration: none;
    color: var(--gray-light);
}

.woosponder-content .page-footer .footer-icon {
    min-width: 15px;
    min-height: 15px;
    margin-left: 11px;
    background-repeat: no-repeat;
    background-size: contain;

    &.icon-clock {
        background-image: url('icons/footer-clock-icon.svg');
    }

    &.icon-phone {
        background-image: url('icons/footer-phone-icon.svg');
    }

    &.icon-mail {
        background-image: url('icons/footer-mail-icon.svg');
    }

    &.icon-whatsapp {
        background-image: url('icons/footer-whatsapp-icon.svg');
    }
}

.woosponder-content .footer-logo {
    min-width: 118px;
    min-height: 41px;
    margin-left: 72px;
    background-image: url('icons/footer-logo.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Sync-tab Danik */

.woosponder-sync-tab form {
    max-width: 519px;
}

.woosponder-sync-tab form div {
    margin-bottom: 0;
}

.woosponder-sync-tab .form-block, .woosponder-debug-tab .form-block {
    margin-bottom: 35px;
}
.woosponder-wrap .form-block .submit{
    text-align: inherit;
}
.woosponder-sync-tab h2 {
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}


.text-opacity {
    opacity: 0.8;
}
/* custom toggle button */
/* Style the toggle container */
.woosponder-toggle-button {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
  }
  
  /* Hide the checkbox (input) */
  .woosponder-toggle-button input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* Style the switch (background) */
  .woosponder-toggle-button label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light-2);
    border-radius: 25px;
    transition: background-color 0.3s ease;
  }
  
  /* Style the knob (circle) */
  .woosponder-toggle-wrap {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    gap: 2rem;
}
.woosponder-toggle-label, .woosponder-debug-settings-label {
    font-size: 1rem;
    font-weight: 600;
}


.woosponder-toggle-switch {
    position: relative;
    display: inline-block !important;
    width: 60px;
    height: 30px;
    margin: 0 !important;
}

.woosponder-toggle-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.woosponder-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light-2);
    -webkit-transition: .4s;
    transition: .4s;
}

.woosponder-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .woosponder-toggle-slider {
    background-color: var(--main-light);
}

input:focus + .woosponder-toggle-slider {
    box-shadow: 0 0 1px var(--main-light);
}

input:checked + .woosponder-toggle-slider:before {
    -webkit-transform: translateX(28px);
    -ms-transform: translateX(28px);
    transform: translateX(28px);
}

/* Rounded sliders */
.woosponder-toggle-slider.round {
    border-radius: 30px;
}

.woosponder-toggle-slider.round:before {
    border-radius: 50%;
}


/* Custom select2  */
.select2_custom_wrap{
    position: relative;
}
.woosponder-content .select2-container--default .select2-selection--single .select2-selection__arrow b{
    display: none;
}

.woosponder-content .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
    background: url(icons/arrow-down-icon.svg) no-repeat;
    background-position: center;
    min-height: 10px;
    min-width: 10px;
    top: auto;
    left: 10px;
    transition: all 0.3s;
}

.woosponder-content .select2-container--open .select2-selection__arrow {
    transform: rotate(-180deg);
}

.woosponder-content .select2-container[dir="rtl"] .select2-selection .select2-selection__rendered {
    padding: 0;
}

.woosponder-content .select-wrapper .select2-container {
    width: 100% !important;
}

.woosponder-content .select2-selection {
    display: flex;
    align-items: center;
    height: 44px;
    background: rgba(216, 216, 216, 0.1);
    border: 1px solid rgba(63, 65, 64, 0.2);
    border-radius: 2px;
    padding: 10px;
    max-width: 520px;
}

.woosponder-content .select2-dropdown {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 10px 10px 0px;
}

.woosponder-content .select2-search--dropdown {
    background-image: url(icons/search-select-icon.svg);
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 20px 12px;
    padding: 0 0 10px 0;
}

.woosponder-content .select2-search--dropdown .select2-search__field {
    padding-left: 24px;
}

.woosponder-content .select2-results__option {
    display: flex;
    font-family: "Assistant", sans-serif;
}

.woosponder-content .select2-container--open .select2-dropdown--above,
.woosponder-content .select2-container--open .select2-dropdown--below {
    margin-top: 4px;
    /*
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    */
}

.woosponder-content .select2-container--default .select2-results>.select2-results__options {
    overflow-y: auto;

    &::-webkit-scrollbar {
        width: 12px;
    }

    &::-webkit-scrollbar-thumb {
        background-color: #c3c7ce;
        /* Scrollbar slider color */
        border-radius: 4px;
        /* Rounding the corners of the slider */
    }

    &::-webkit-scrollbar-thumb:hover {
        background-color: #888;
        /* Color of the slider on hover */
    }

    &::-webkit-scrollbar-track {
        background-color: #f7f7f7;
        /* Scrollbar background color */
        border-radius: 4px;
        /* Rounding the corners of the background */
    }
}

.woosponder-content .select2-results__option,
.woosponder-content .select2-search--dropdown .select2-search__field {
    max-width: 500px;
    margin: 0;
    font-size: 18px;
    color: var(--gray-dark);
}

.woosponder-content .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(0, 115, 230, 0.2);
    color: var(--gray-dark);
}

.woosponder-sync-tab form input[type="text"],
.woosponder-sync-tab select,
.woosponder-content .form-field {
    background-position: left 10px top 55%;
    box-sizing: border-box;
    background-color: rgba(216, 216, 216, 0.1);
    height: 44px;
    border: 1px solid rgba(63, 65, 64, 0.2);
    border-radius: 2px;
    padding: 10px;
    appearance: none;

    &.form-field {
        width: 100%;
    }

    &::placeholder {
        color: #3f4140;
    }
}

.woosponder-content .select2-results__option{
    margin: 5px 0;
}

#select2-woosponder_custom_tags-container .select2-selection__placeholder{
    color: var(--gray-dark);
}

#user-tag-list {
    display: flex;
    flex-wrap: wrap;
}

.woosponder-content .user-tag {
    border: 1px solid rgba(63, 65, 64, 0.2);
    border-radius: 7px;
    padding: 10px 20px 10px 15px;
    width: fit-content;
    display: flex;
    align-items: center;
    margin-top: 15px;
    margin-left: 10px;
    letter-spacing: 0.01em;
}

.woosponder-content .user-tag-name {
    font-weight: 600;
    margin-left: 20px;
    font-size: 1rem;
}

.woosponder-content .button-remove {
    background-image: url(icons/button-remove-icon.svg);
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    border: none;
    background-color: inherit;
    width: 10px;
    height: 10px;
    padding: 0;
}

.woosponder-sync-tab .checkbox-wrap {
    margin-top: 13px;
    display: flex;
    align-items: center;
}

.woosponder-content .tag-name,
.woosponder-sync-tab select,
.woosponder-content .select2-selection__rendered,
.woosponder-sync-tab .form-text-checkbox {
    font-size: 18px;
    letter-spacing: 0.01em;
    color: var(--gray-dark);
    line-height: normal;
    word-break: break-word;
    max-width: initial;
}

.woosponder-sync-tab .form-text-checkbox {
    font-weight: 600;
    margin-bottom: 0;
}

.woosponder-sync-tab form input[type="checkbox"] {
    margin-left: 12px;
    border: 1px solid rgba(0, 115, 230, 0.25);
    border-radius: 3px;
    min-width: 20px;
    min-height: 20px;
    appearance: none;
    border: 1px solid var(--main);

    &:checked {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(0, 115, 230, 0.25);

        &::after {
            content: '';
            background-image: url(icons/sync-checkbox-icon.svg);
            background-repeat: no-repeat;
            background-position: center;
            display: block;
            min-width: 15px;
            min-height: 12px;

        }
    }
}

.woosponder-content .fieldset-custom {
    display: flex;
    flex-direction: column;
}

.woosponder-field-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 1rem;
}
.woosponder-field-wrapper .column-item {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    flex: 1;
    margin: 0;
}
.responder_field.disabled{
    pointer-events: none;
    color: var(--gray-dark);
}

.woosponder-content .error_field_message{
    display: none;
}
.error_field_wrapper .error_field_message{
    display: initial;
    color: red;
}
.error_field_wrapper input, .error_field_wrapper select, .error_field_wrapper textarea, .woosponder-content .error_field_wrapper .select2-selection{
    border: 1px solid red;
}

.woosponder-content .fieldset-column {
    display: flex;
    flex-direction: column;
    width: 100%;

    &:not(:first-child) {
        margin-left: 12px;
    }
}

.woosponder-content .column-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--gray-normal);
    letter-spacing: 0.02em;
}

.woosponder-content .column-item {
    white-space: nowrap;
    &:not(:nth-child(5n)) {
        margin-bottom: 16px;
    }

}

.woosponder-content .form-button {
    border-radius: 2px;
    padding: 10px 20px;
    border: none;
    min-width: 241px;
    min-height: 44px;
    background: var(--main);
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    margin-left: auto;
    white-space: nowrap;
    font-family: "Assistant", sans-serif;

    &:hover {
        background-color: #054483;
    }
}

/* debug tab */
.woosponder-debug-settings-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 2rem;
}
.woosponder-debug-settings-value {
    font-size: 1rem;
}


/* Alert block Danik */

.woosponder-content .message-block {
    border-radius: 6px;
    padding: 14px 11px;
    max-width: 530px;
    max-height: 74px;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.4);
    background: #fff;
    position: fixed;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    bottom: 2rem;
    transform: translate(-50%, 0);
    left: 50%;
    z-index: 999;

    &.success-alert {
        border-bottom: 6px solid #32902f;
        /*display: none;*/
    }

    &.error-alert {
        border-bottom: 6px solid #d90808;
    }
}

.woosponder-content .remove-button-icon-message {
    display: block;
    font: bold;
    background: url(icons/message-remove-icon.svg) no-repeat center;
    background-color: inherit;
    margin-right: auto;
    padding: 0;
    cursor: pointer;
    border: none;
    width: 24px;
    height: 24px;
}

.woosponder-content .message-text-block {
    margin: 8px 18px;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.text-message {
    font-weight: 400;
    font-size: 18px;
    color: #333;
    margin-right: 10px;
}

.woosponder-content .message-icon {
    display: flex;
    min-width: 18px;
    min-height: 18px;

    &.success-icon {
        background: url(icons/success-icon.svg) no-repeat center;
        background-size: contain;
    }

    &.error-icon {
        background: url(icons/error-icon.svg) no-repeat center;
        background-size: contain;
    }
}


/* Media  */

@media (max-width: 960px) {
    body.toplevel_page_woosponder #wpcontent {
        margin: 0;
    }
}

@media (max-width: 782px) {
    body.toplevel_page_woosponder #wpcontent {
        padding-right: 0;
    }
}

@media (max-width: 800px) {
    .woosponder-content .column-title {
        font-size: 16px;
    }

    .woosponder-content .nav-menu {
        flex-direction: column;
        align-items: end;
    }

    .woosponder-content .nav-link {
        margin-left: 0;
        &:not(:last-child) {
            margin-bottom: 8px;
        }
    }

    .woosponder-content .footer-logo {
        margin: 0;
    }

    .woosponder-content .footer-item {
        margin-bottom: 12px;
    }

    .woosponder-content .footer-contacts {
        flex-direction: column;
    }

    .woosponder-content .page-footer {
        flex-direction: column;
        align-items: center;
    }
}

#titlediv #title {
    pointer-events: none; /* Disable user input */
    background-color: #f9f9f9; /* Optional: Grey out the field */
    color: #777; /* Optional: Adjust text color */
}

/******** Front ********/
[for*="woosponder_newsletter_consent"] .wc-block-components-checkbox__label, .wc-block-components-additional-fields-list dt{
    opacity: 0;
    transition: opacity 0.2s ease-in-out;  /* Control the fade-in duration */
}