/* Admin panel related CSS goes here */

.sapmfly-fonts {
    font-family: 'Inter', sans-serif;
}

.sapmfly-display-flex {
    display: flex;
}

.sapmfly-admin-setup-body {
    width: 35%;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Admin setup page CSS goes here */
.sapmfly-admin-page-body,
.sapmfly-ecommerce-page-body {
    margin-right: 15px;
}

.sapmfly-admin-setup-settings-area,
.sapmfly-ecommerce-settings-area,
.sapmfly-white-label-settings-area,
.sapmfly-configuration-settings-area {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.sapmfly-admin-setup-header,
.sapmfly-ecommerce-setup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 10px;
    padding-right: 15px;
    padding-bottom: 10px;
}

.sapmfly-admin-setup-header-controls,
.sapmfly-ecommerce-setup-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sapmfly-admin-setup-header-title h2,
.sapmfly-ecommerce-setup-header-title h2 {
    margin: 0;
    font-size: 22px;
    color: #288acb;
}

/* Only hide notices if body has the sapmfly-hide-notices class */
body.sapmfly-hide-notices .notice,
body.sapmfly-hide-notices .updated,
body.sapmfly-hide-notices .error,
body.sapmfly-hide-notices .is-dismissible {
    display: none !important;
}

body.sapmfly-hide-notices .update-nag,
body.sapmfly-hide-notices .update-message,
body.sapmfly-hide-notices .update-php {
    display: block !important;
}

.sapmfly-user-setup-page-body,
.sapmfly-white-label-page-body {
    margin-right: 15px;
}

.sapmfly-page-heading {
    margin: 30px;
    margin-bottom: 15px;
}

.sapmfly-page-heading h1 {
    font-size: 24px;
}

.sapmfly-page-heading p {
    margin-top: -6px !important;
    font-size: 16px;
}

.sapmfly-user-setup-header,
.sapmfly-white-label-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 10px;
    padding-right: 15px;
    padding-bottom: 10px;
}

.sapmfly-user-setup-header-title h2,
.sapmfly-white-label-header-title h2 {
    margin: 0;
    font-size: 22px;
    color: #288acb;
}

.sapmfly-user-setup-header-controls,
.sapmfly-white-label-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sapmfly-toggle-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.sapmfly-toggle-wrapper .sapmfly-switch {
    box-sizing: border-box;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    height: 100%;
    width: 100%;
}

.sapmfly-toggle-label {
    font-size: 14px;
    color: #000;
}

.sapmfly-enable-all {
    margin-right: 30px;
    margin-left: -10px;
}

.sapmfly-save-btn {
    background-color: #288acb;
    color: #fff;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(245, 37, 87, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sapmfly-save-btn:hover {
    background-color: #d71d4b;
}

/* WooCommerce related CSS goes here */
.sapmfly-woocommerce-not-activated {
    background-color: #fff4e5;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    color: #8a4b00;
    font-weight: 500;
    margin-bottom: 20px;
    display: inline-block;
}

.sapmfly-user-setup-settings-area {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Admin panel dark mood css goes here */
#sapmfly-admin-dark-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: #23282d;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#sapmfly-admin-dark-toggle:hover {
    background-color: #444;
}

body.sapmfly-dark-mode {
    background-color: #1e1e1e !important;
    color: #fff !important;
}

body.sapmfly-dark-mode .wrap,
body.sapmfly-dark-mode #wpcontent,
body.sapmfly-dark-mode #wpadminbar,
body.sapmfly-dark-mode #adminmenu,
body.sapmfly-dark-mode .postbox,
body.sapmfly-dark-mode input,
body.sapmfly-dark-mode select,
body.sapmfly-dark-mode textarea,
body.sapmfly-dark-mode .button,
body.sapmfly-dark-mode .button-primary {
    background-color: #2c2c2c !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.sapmfly-dark-mode a {
    color: #8ab4f8 !important;
}

body.sapmfly-dark-mode .notice,
body.sapmfly-dark-mode .update-nag {
    background-color: #333 !important;
    border-left-color: #555 !important;
    color: #eee !important;
}

body.sapmfly-dark-mode .sapmfly-page-heading h1 {
    color: #fff;
}

/* Pro label related CSS goes here */
.sapmfly-pro-toggle {
    display: inline-block;
    border: 1px solid #ffa500;
    transition: all 0.3s ease;
}

.pro-opacity {
    opacity: 0.8;
}

.sapmfly-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sapmfly-pro-label {
    position: absolute;
    top: 40px;
    right: -15px;
    background: #ffa500;
    color: #fff;
    font-size: 15px;
    padding: 4px 10px;
    border-radius: 5px 0 5px 0;
}

.minifly-pro-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.minifly-pro-popup p {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
}

.minifly-pro-popup button {
    padding: 6px 12px;
    background: #ffa500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.minifly-pro-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
}

/* New css for block design */

/* Container styles */
.toggle-block-bg {
    padding: 15px;
    border-radius: 8px;
    background: #f5f5f5;
}

.sapmfly-pro-available-label {
    padding: 15px;
    padding-top: 0;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #ffa500;
    margin: 10px 0;
}

.sapmfly-pro-available-label a {
    text-decoration: none;
}

.sapmfly-pro-available-label p {
    font-size: 15px;
    color: #ffa500;
    margin-top: 5px;
    text-decoration: underline;
    font-weight: bold;
}

/*Toggle blocked CSS*/
.sapmfly-toggle-blocked {
    padding: 15px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #f5f5f5;
    margin: 10px 0;
}

/* Header row layout */
.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 15px;
}

/* Hide the default checkbox */
.sapmfly-setting-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.sapmfly-setting-toggle-pro {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Body styles */
.sapmfly-toggle-resource-body {
    display: flex;
    gap: 8px;
}

.sapmfly-toggle-resource-body div {
    text-align: center;
    border-radius: 5px;
}

.sapmfly-toggle-resource-body div p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    padding: 1px 6px;
    color: #ffffff;
}

.sapmfly-toggle-resource-body div p a {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

/* Highlight the "Customization in pro" box */
.sapmfly-adjust {
    background-color: #fffbe6;
    border-color: #ffe58f;
    font-weight: bold;
}

/* Make whole label clickable */
label.sapmfly-switch-update {
    display: block;
    cursor: pointer;
    position: relative;
}

.sapmfly-docs {
    background: #288acb;
}

.sapmfly-tags {
    background: #5262EE;
}

.sapmfly-adjust {
    background: #ffa500;
}

/* Customization popup style goes here */
.sapmfly-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sapmfly-popup-modal {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    left: 500px;
    top: 125px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sapmfly-popup-modal h3 {
    margin-top: 0;
}

.sapmfly-popup-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.sapmfly-popup-modal input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.sapmfly-popup-modal button {
    padding: 8px 16px;
    margin-right: 10px;
    border: none;
    background-color: #2271b1;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.sapmfly-popup-modal button.sapmfly-clear-customization {
    background-color: #dd6666;
}

.sapmfly-popup-modal button.sapmfly-close-popup {
    background-color: #777;
}

.sapmfly-popup-notice {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    background: #dff0d8;
    color: #3c763d;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    border-radius: 6px;
    transform: translateY(-100%);
}

.sapmfly-popup-btn {
    padding: 8px 16px;
    margin-right: 10px;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.sapmfly-save-pb {
    background-color: #2271b1;
}

.sapmfly-clear-pb {
    background-color: #dd6666;
}

.sapmfly-close-popup {
    background-color: #777;
}


/* Progress bar popup related CSS goes here */
.sapmfly-pb-popup-overlay,
.sapmfly-fc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sapmfly-pb-input-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

/* Popup Modal */
.sapmfly-pb-popup-modal,
.sapmfly-fc-popup-modal {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    max-width: 350px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sapmfly-pb-popup-modal h3 {
    margin-top: 0;
}

.sapmfly-pb-popup-modal label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    color: #444;
}

.sapmfly-pb-popup-modal input {
    height: 30px;
    padding: 0;
    padding-left: 5px;
    border: none;
    outline: none;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
}

.sapmfly-pb-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Style placeholder when empty button is clicked */
.sapmfly-hidden-placeholder::placeholder {
    color: #888;
    font-style: italic;
}

/* Click to talk related code goes here */
#sapmfly-click-to-talk-block,
#sapmfly-click-to-call-block,
#sapmfly-floating-btn-block {
    display: none;
}

/* Overlay */
.sapmfly-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

/* Popup Wrapper */
.sapmfly-click-to-talk-area,
.sapmfly-click-to-call-area {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
    z-index: 9999;
    padding: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .25);
    display: none;
}

/* Popup wrapper for floating button */
.sapmfly-floating-btn-area {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
    z-index: 9999;
    padding: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .25);
    display: none;
}

/* Header */
.click-chat-header {
    position: relative;
    margin-bottom: 10px;
}

.sapmfly-popup-close-btn,
.sapmfly-popup-call-close-btn,
.sapmfly-click-popup-close-icon {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 26px;
    cursor: pointer;
    color: #ff3b3b;
}

/* Labels */
.sapmfly-click-to-talk-area label,
.sapmfly-click-to-call-area label,
.sapmfly-floating-btn-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.sapmfly-click-to-talk-area h3,
.sapmfly-click-to-call-area h3,
.sapmfly-floating-btn-area h3 {
    margin-top: 0;
}

.click-chat-header-group,
.sapmfly-floating-btn-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.sapmfly-floating-btn-selected-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.sapmfly-floating-btn-selected-group option {
    width: 60px;
    height: 30px;
    padding: 0;
    padding-left: 5px;
    border: none;
    outline: none;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
}

.sapmfly-floating-btn-selected-group select,
.sapmfly-floating-btn-selected-group select:focus,
.sapmfly-floating-btn-selected-group select:active {
    border: none;
    outline: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid #2db742;
}

.sapmfly-floating-btn-style-group {
    display: flex;
    gap: 9px;
    margin: 10px 0;
    color: #444;
}



.wp-admin .sapmfly-floating-btn-style-group input[type="radio"]:checked::before {
    background-color: #46b450 !important;
}

.click-chat-image-group {
    display: flex;
    align-items: baseline;
    color: #444;
}

.sapmfly-floating-btn-image-group {
    display: flex;
    align-items: baseline;
    color: #444;
    font-weight: 600;
    margin-bottom: 10px;
}

.click-chat-agent-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.click-chat-image-group input[type="file"],
.sapmfly-floating-btn-image-group input[type="file"] {
    width: 70%;
    cursor: pointer;
    border: none;
    padding-left: 10px;
}

/* Inputs */
.sapmfly-click-to-talk-area input,
.sapmfly-click-to-call-area input,
.sapmfly-floating-btn-group input {
    height: 30px;
    padding: 0;
    padding-left: 5px;
    border: none;
    outline: none;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
}

.sapmfly-click-to-talk-area input:focus,
.sapmfly-click-to-call-area input:focus,
.sapmfly-floating-btn-group input:focus,
.sapmfly-floating-btn-group select:focus {
    border-color: #2db742;
    outline: none;
    box-shadow: none;
}


/* Buttons */
.sapmfly-popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.sapmfly-click-talk-popup-actions button,
.sapmfly-click-call-popup-actions button {
    padding: 8px 16px;
    margin-right: 5px;
    margin-top: 10px;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.click-chat-save-btn,
.click-call-save-btn {
    background-color: #2271b1;
}

.click-chat-clear-btn {
    background-color: #dd6666;
}

.click-chat-close-btn,
.click-call-close-btn {
    background-color: #777777;
}

.sapmfly-popup-save {
    padding: 8px 16px;
    margin-right: 5px;
    margin-top: 10px;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    background-color: #2271b1;
}

.sapmfly-popup-clear {
    padding: 8px 16px;
    margin-right: 5px;
    margin-top: 10px;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    background-color: #dd6666;
}

.sapmfly-popup-close {
    padding: 8px 16px;
    margin-right: 5px;
    margin-top: 10px;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    background-color: #777777;
}

/* Smooth Animation */
@keyframes sapmflyFadeZoom {
    from {
        transform: translate(-50%, -50%) scale(.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.sapmfly-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #46b450;
    /* Green for success */
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.sapmfly-notice.show {
    opacity: 1;
    transform: translateY(0);
}

.sapmfly-notice.hide {
    opacity: 0;
    transform: translateY(-20px);
}

/* Configuration page related CSS starts */

.sapmfly-configuration-export {
    max-width: 60%;
}

.sapmfly-configuration-settings-table tr {
    vertical-align: baseline;
}

.sapmfly-configuration-settings-table tr td {
    padding-right: 30px;
    padding-bottom: 20px;
}

#sapmfly-configuration-settings-table-free {
    padding-right: 90px;
}

.sapmfly-import-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sapmfly-configuration-warning {
    margin-top: 12px;
    color: #d63638;
    font-weight: 600;
}

.sapmfly-configuration-clear-icon {
    cursor: pointer;
    color: #d63638;
    margin-left: 10px;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
}

#sapmfly-submit-reset:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#sapmfly_reset_input:focus {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
    outline: none;
}

.sapmfly-reset-confirm-note {
    margin: 0 0 10px 0;
    font-size: 13px;
}

.sapmfly-reset-confirm-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

#sapmfly_import_file,
#sapmfly-file-info,
#sapmfly-real-submit {
    display: none;
}

#sapmfly_reset_input {
    border: 1px solid #d63638;
    padding: 5px 10px;
    height: 32px;
    flex-grow: 1;
}

.sapmfly-save-btn-dead {
    box-shadow: none;
    cursor: unset;
    transition: none;
    background-color: #7a7a7a;
}

.sapmfly-save-btn-dead:hover {
    background-color: #7a7a7a;
}