/* Updated CSS for Toggle Switch */
.cfkef-toggle-switch {
    position: relative;
    display: inline-block;
    width: 2.5em;
    height: 1.4em;
    font-size:16px;
    vertical-align: middle;
    flex-shrink: 0;
}

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

.cfkef-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: background-color 0.3s;
    border-radius: 999px;
}

.cfkef-slider::before {
    content: "";
    position: absolute;
    height: 1em;
    width: 1em;
    left: 0.2em;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

input:checked + .cfkef-slider {
    background-color: #fb5fab;
}

input:checked + .cfkef-slider::before {
    transform: translate(1.1em, -50%);
}

/* nav tab css */
.cfkef-wrapper h2.nav-tab-wrapper,
.cfkef-wrapper .tab-content{
    padding: 0 30px;
}

.cfkef-wrapper h2.nav-tab-wrapper .nav-tab {
  padding: 10px 15px;
}

.cfkef-wrapper h2.nav-tab-wrapper .nav-tab-active{
    background-color: #fff;
    border-bottom-color: #fff;
}


/* For container wrapping label and optional text */
.cfkef-toggle-all-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
    font-size: 0.9rem; 
}

.cfkef-toggle-label {
    margin: 0;
    vertical-align: middle;
    white-space: nowrap;
}

/* Element Card Wrapper Styler */
.cfkef-form-element-wrapper:nth-child(1) .wrapper-body .cfkef-form-element-card {
  width: calc(33.333% - 15px);
  flex-wrap: wrap;
}
.cfkef-form-element-wrapper:nth-child(1) .wrapper-body .cfkef-form-element-card .cfkef-toggle-switch{
    min-width: 41px;
}

.cfkef-form-element-wrapper{
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0px 2px 2px rgb(150 150 150 / 12%);
}

.cfkef-settings-box .wrapper-body{
    padding: 10px 20px;
}

.cfkef-form-element-wrapper .wrapper-body{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background-color: white;
    padding: 20px;
    border-radius:5px;
}
.cfkef-form-element-wrapper .wrapper-body p{
    margin: 0px;
}
.cfkef-form-element-wrapper .wrapper-body .cfkef-form-element-box{
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cfkef-settings-box .wrapper-header,
.cfkef-form-element-wrapper .wrapper-header {
    padding: 1px 20px;
    background-color: #3f415e;
    border-radius: 5px 5px 0px 0px;
}
.cfkef-settings-box .wrapper-header h2,
.cfkef-form-element-wrapper .wrapper-header h2,
.cfkef-form-element-wrapper .wrapper-header span{
    color: white;
}

.cfkef-settings-box .wrapper-header .cfkef-save-all,
.cfkef-form-element-wrapper .wrapper-header .cfkef-save-all{
    margin-bottom: 0px;
}


/* Card Styles */
.cfkef-form-elements-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 74%;
    align-content: flex-start;
}

.cfkef-form-element-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px; 
    flex-grow: 1;
    overflow: hidden;
}

.cfkef-form-element-info img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.cfkef-form-element-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfkef-form-element-info > div {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cfkef-form-element-info a:focus {
    box-shadow: unset;
}


.cfkef-form-element-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    width: calc(50.300% - 15px);
    box-shadow: 0px 2px 2px rgb(150 150 150 / 12%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    gap:10px;
}

.cfkef-form-element-card h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    white-space: initial;
}
.cfkef-form-element-card h4 span{
    font-size: 12px;
    font-style: italic;
    font-weight: lighter;
}

.cfkef-form-element-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cfkef-form-element-icons a {
    text-decoration: none;
    color: #27C3F3;
    border: 1px solid;
    border-radius: 3px;
    padding: 1px 3px;
    font-size: 10px;
    text-transform: uppercase;
    width: 14px;
    height: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 0.5s;
    overflow: hidden;
}

.cfkef-form-element-icons a:hover {
    color: #666;
    width: 60px;
}

.cfkef-form-element-icons a span {
    display: none;
    margin-left: 2px;
    white-space: nowrap;
}

.cfkef-form-element-icons a:hover span {
    display: inline;
}

.cfkef-form-element-icons a i {
    font-size: 12px;
    vertical-align: middle;
    width: 12px;
    height: 12px;
}

/* Popular and Updated Labels */
.cfkef-label-popular, .cfkef-label-updated {
    font-size: 10px;
    text-transform: uppercase;
    color: #fff;
    background-color: #fb5fab;
    padding: 2px 6px;
    border-radius: 4px;
    position: absolute;
    top: -10px;
    left: 20px;
}

.cfkef-label-updated {
    background-color: #3f415e;
}

.cfkef-wrapper {
  margin: 0 0 0 -20px;
  padding: 0;
  box-sizing: border-box;
}

.cfkef-wrapper * {
    box-sizing: border-box;
    font-family: Inter, Roboto, Helvetica, Arial, sans-serif;
}

body.elementor_page_cool-formkit,
body.elementor_page_cfkef-entries{
    background-color: #fff;
}

.elementor_page_cool-formkit #wpbody #wpbody-content {
    margin-top: 80px !important;
    margin-block-start: 80px !important;
}
.elementor_page_cool-formkit .e-admin-top-bar--active,
.elementor_page_cool-formkit #e-admin-top-bar-root,
.elementor_page_cool-formkit #wpfooter {
    display: none !important;
}
.elementor_page_cool-formkit .notice {
    margin: 2px 20px 20px 0;
}

.cfkef-wrapper .button {
    padding: 10px 14px;
    background-color: #3f415e;
    border: 1px solid #323348;
    box-shadow: 1px 2px 6px -4px rgba(56, 60, 96, 0.977);
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    line-height: 14px;
    align-self: center;
    text-shadow: 1px 1px 1px #323348;
}
.cfkef-wrapper .button:focus {
    box-shadow: 0 0 2px 2px #323348;
    outline: none;
    border: 1px solid #323348;
    background: #0E1136;
    color: #fff;
    text-shadow: none;
}
.cfkef-wrapper .button-secondary {
    background: #f9f9f9;
    border: 1px solid #ccc;
    color: #595959;
    box-shadow: 1px 3px 4px -5px rgb(55 55 55 / 42%);
    text-shadow: 1px 1px 1px #ffffff;
}
.cfkef-wrapper .button:hover {
    box-shadow: 1px 2px 6px -4px rgb(30, 31, 48);
    border: 1px solid #323348;
    background: #0E1136;
    color: #fff;
    text-shadow: none;
}
.wrapper-header .cfkef-save-all .cfkef-save-controls .button{
    background-color: #fb5fab;
    border:1px solid #fd79b9;
    text-shadow: 1px 1px 1px #fc63ad;
}
.wrapper-header .cfkef-save-all .cfkef-save-controls .button:hover,
.wrapper-header .cfkef-save-all .cfkef-save-controls .button:focus{
    background-color: #e8338a;
    border-color: #ff57a8;
    text-shadow: 1px 1px 1px #f0398d;
}
.wrapper-header .cfkef-save-all .cfkef-save-controls .button:focus {
    box-shadow: 0 0 4px 2px #f0cedf;
    outline: none;
}

.cfkef-wrapper .button-secondary:hover {
    box-shadow: 1px 2px 6px -4px rgb(51, 50, 73);
    background: #f1f1f1;
    border-color: #ccc;
    color: #222;
}

/* Header Styles */
.cfkef-header {
    position: absolute;
    top: 0px;
    left: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 30px;
    border-bottom: 1px solid #ddd;
    height: 60px;
    width: calc(100% + 20px);
    margin: 0 0 0 -20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .03);
}

.cfkef-header-logo {
    display: flex;
    align-items: center;
}
.cfkef-header-logo a[href="?page=cool-formkit"]:focus{
    box-shadow: unset;
    outline: none;
}

.cfkef-header-logo img {
    max-height: 32px;
}

.cfkef-header-buttons {
    display: flex;
    gap: 15px;
}

/* Sidebar Styles */
.cfkef-main-content {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 25px;
}

.cfkef-sidebar {
    width: 26%;
}

.cfkef-sidebar-block {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0px 2px 2px rgb(150 150 150 / 12%);
    margin-bottom: 20px;
}

.cfkef-sidebar-block h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

.cfkef-sidebar-block p {
    margin: 0 0 10px;
}

.cfkef-sidebar-block .cfkef-sidebar-link-group{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    position: relative;
}
.cfkef-sidebar-block .cfkef-sidebar-link-group a{
    white-space: normal;
}
.cfkef-sidebar-block .cfkef-sidebar-link-group a picture img{
    height: 100%;
    width: 100%;
}
.cfkef-sidebar-block .cfkef-sidebar-link-group img.youtube-logo{
    width: 54px;
    height: 54px;
    position: absolute;
    left: calc(50% - 27px);
    top: calc(50% - 27px);
    animation: play-icon 1s ease-in-out infinite;
}

@keyframes play-icon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Save All Button Styles */
.cfkef-save-all, .cfkef-save-bottom {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cfkef-title-desc {
    display: inline-block;
    vertical-align: middle;
}

.cfkef-save-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Review Request Styles */
.cfkef-review-request {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0px 2px 2px rgb(150 150 150 / 12%);
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cfkef-review-left {
    flex: 1;
}

.cfkef-review-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cfkef-sidebar-link-group .cfkef-review-right{
    flex-direction: row-reverse;
}

.cfkef-review-request h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.cfkef-review-request p {
    margin: 0;
}

.cfkef-stars {
    display: flex;
    gap: 5px;
    font-size: 24px;
    color: #FFD700;
}

/* Settings Page */
.cfkef-settings-box {
    margin: 25px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0px 2px 2px rgb(150 150 150 / 12%);
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    position: relative;
    flex-direction: column;
    font-family: Inter, Roboto, Helvetica, Arial, sans-serif;
}

.highlight-description{
    font-size: 15px;
    font-weight: bold;
    color: black;
}

.form-table .cool-formkit-table-td #cfefp_cloudflare_site_key, .form-table .cool-formkit-table-td #cfefp_cloudflare_secret_key, .form-table .cool-formkit-table-td #cfefp_h_site_key, .form-table .cool-formkit-table-td #cfefp_h_secret_key
,.form-table .cool-formkit-table-td #cfl_site_key_v2,.form-table .cool-formkit-table-td #cfl_secret_key_v2,.form-table .cool-formkit-table-td #cfl_site_key_v3,.form-table .cool-formkit-table-td #cfl_secret_key_v3,#cfl_mailchimp_api_key, #cfl_getresponse_api_key{
    outline: none !important;
    border: none !important;
    margin: 0px 5px;
    box-shadow: none;
    padding: 0;
}

.form-table .cool-formkit-table-td #cfefp_cloudflare_site_key:focus, .form-table .cool-formkit-table-td #cfefp_cloudflare_secret_key:focus .form-table .cool-formkit-table-td #cfefp_h_site_key:focus, .form-table .cool-formkit-table-td #cfefp_h_secret_key:focus
,.form-table .cool-formkit-table-td #cfl_site_key_v2:focus,.form-table .cool-formkit-table-td #cfl_secret_key_v2:focus,#cfl_mailchimp_api_key:focus, #cfl_getresponse_api_key:focus{
    outline: none !important;
    border: none !important;
    margin: 0px 5px;
    box-shadow: none;
    padding: 0;

}


.form-table .site-key-td, .form-table .secret-key-td{

    display: inline-block;
    padding: 0px 10px;
    width: 25em;

    box-shadow: 0 0 0 transparent;
    border-radius: 4px;
    border: 1px solid #8c8f94;
    background-color: #fff;
    color: #2c3338;

    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
    
}

.site-key-show-hide-icon img, .secret-key-show-hide-icon img, .site-key-show-hide-icon-h-captcha img, .secret-key-show-hide-icon-h-captcha img
,.site-key-show-hide-icon-recaptcha img,.secret-key-show-hide-icon-recaptcha img
,.site-key-show-hide-icon-recaptcha_v3 img,.secret-key-show-hide-icon-recaptcha_v3 img,
.mailchimp-show-hide-icon img, .getresponse-show-hide-icon img{
    width: 25px;
}

.cfkef-toggle-wrapper-div{
    display: flex;
    gap: 20px;
}
.cfkef-toggle-wrapper-div .cfkef-toggle-all-wrapper{
    border: 3px solid #f1f1f1;
    padding: 20px;
    border-radius: 8px;
    transition: border-color 0.6s linear;
}
.cfkef-toggle-wrapper-div .cfkef-toggle-all-wrapper .cfkef-toggle-switch{
    margin-bottom: unset;
    min-width: 60px;
}
.cfkef-toggle-wrapper-div .cfkef-toggle-all-wrapper .cfkef-toggle-label{
    font-size: 16px;
    font-weight: 600;
}
td.cool-formkit-table-td.usage-share-data,
td.cool-formkit-table-td.enable-spam-blocker {
    display: flex;
    align-items: start;
    gap: 8px;
}

/* tooltip styles */
.cfkef-tooltip {
    position: absolute;
    top: -10px;
    right: 0px;
    transform: translateY(-100%);
    background: #3f415e;
    color: #fff;
    padding: 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    display: none;
    z-index: 99;
    box-shadow: 0 2px 10px rgb(51, 47, 69);
}

.cfkef-form-element-card.cfkef-has-tooltip:hover  {
    cursor: pointer;
}

.cfkef-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 6px;
    border-style: solid;
    border-color: #3f415e transparent transparent transparent;
}

/* Shake Effect On save buttons*/
.shake-effect {
	animation: shake 0.5s linear infinite;
}

@keyframes shake {
	0% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	50% { transform: translateX(3px); }
	75% { transform: translateX(-3px); }
	100% { transform: translateX(0); }
}

/* Dashboard tab styles For Entries Page*/
.cfkef-dashboard-tabs {
    margin-top: 80px;
}
.cfkef-activate-plugin-btn,.cfkef-install-plugin-btn,.cfkef-activate-check-theme{
    cursor: pointer;
    background-color: #fb5fab;
    color: white;
    border: none;
    padding: 5px 3px;
    border-radius: 3px;
    margin-left: 10px;
}

/* dashboard loader effect css */
#cfkef-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfkef-loader-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
}
.cfkef-loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10000;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.elementor_page_cfkef-entries #screen-meta {
    margin-top: 60px !important;
}
.elementor_page_cfkef-entries #screen-meta-links {
    margin-top: 60px;
}
.elementor_page_cfkef-entries #screen-meta[style="display: block;"] ~ #screen-meta-links{
    margin-top:0px;
}
.elementor_page_cool-formkit #screen-meta-links {
    display: none !important;
}
.elementor_page_cfkef-entries #footer-left,
.elementor_page_cfkef-entries #footer-upgrade{
    display: none;
}  

/* End Dashboard tab styles */

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

    .form-table .site-key-td, .form-table .secret-key-td{
        width: 100% !important;
        margin: 0px;
    }
    .cfkef-header{
        flex-wrap: wrap;
        height: auto;
    }
    .cfkef-header .cfkef-header-buttons{
        display: block;
    }
    .cfkef-wrapper .nav-tab-wrapper{
        margin-top: 35px;
    }
    .elementor_page_cfkef-entries .cfkef-wrapper .nav-tab-wrapper{
        margin-top: 110px;
    }
    .cfkef-form-elements-container,.cfkef-sidebar,
    .cfkef-form-element-wrapper .wrapper-body .cfkef-form-element-card,
    .cfkef-form-element-wrapper:nth-child(1) .wrapper-body .cfkef-form-element-card{
        width: 100%;
    }
    .cfkef-main-content{
        flex-direction: column;
    }
    .cfkef-form-element-wrapper .wrapper-header .cfkef-save-all{
        flex-direction: column;
        align-items: start;
        padding-bottom: 10px;
    }
    .cfkef-form-element-wrapper .wrapper-header .cfkef-save-all .cfkef-save-controls{
        flex-wrap: wrap;
    }
    .cfkef-review-request{
        flex-wrap: wrap;
        gap: 15px;
    }
}
