/* bato-ts-modal-toggler START */
.bato-ts-modal-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    width: 35px;
    background: linear-gradient(90deg, #ff0000, #ffa500, #ffff00, #008000, #0000ff, #800080);
    border-radius: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    rotate: 45deg;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bato-ts-modal-toggler::before {
    content: "";
    display: block;
    border-radius: 100%;
    background-color: #fff;
    opacity: 0.25;
    position: absolute;
    inset: 0;
}

.bato-ts-modal-toggler:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bato-ts-modal-toggler svg {
    aspect-ratio: 1;
    width: 24px;
}
/* bato-ts-modal-toggler END */


/* bato-ts-modal START */
.bato-ts-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bato-ts-modal:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bato-ts-modal__overlay {
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px);
}

.bato-ts-modal__content {
    display: flex;
    flex-direction: column;
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.bato-ts-modal.active .bato-ts-modal__content {
    transform: scale(1);
}

.bato-ts-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.bato-ts-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-heading, #242424);
}

.bato-ts-modal__close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    aspect-ratio: 1;
    font-size: 18px;
    line-height: 1;
    color: #999;
    transition: color 0.3s;
    cursor: pointer;
}

.bato-ts-modal__close:hover {
    color: red;
}

.bato-ts-modal__body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.bato-ts-modal__footer {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f9f9f9;
}
/* bato-ts-modal END */



/* bato-ts-tabs START */
.bato-ts-tabs {
    font-size: 20px;
}

.bato-ts-tabs__nav {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    background: #f9f9f9;
}

.bato-ts-tabs__tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    transition: all 0.2s;
    position: relative;
}

.bato-ts-tabs__tab:hover {
    background: #f0f0f0;
    color: #333;
}

.bato-ts-tabs__tab.active {
    color: var(--color-primary, #0E51BF);
    background: #fff;
}

.bato-ts-tabs__tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary, #0E51BF);
}

.bato-ts-tabs__content {
    display: none;
    padding: 15px;
}

.bato-ts-tabs__content.active {
    display: block;
}

.bato-ts-tabs__form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 15px;
}
/* bato-ts-END START */



/* bato-ts-field START */
.bato-ts-field {
    padding: 15px;
    border: 1px solid #cecece;
    position: relative;
}

.bato-ts-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--color-heading, #242424);
    font-size: 14px;
}

.bato-ts-field input[type="text"],
.bato-ts-field input[type="number"],
.bato-ts-field .bato-select {
    width: 100%;
    padding: 6.25px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.bato-ts-field input[type="text"]:focus,
.bato-ts-field input[type="number"]:focus,
.bato-ts-field .bato-select:focus {
    outline: none;
    border-color: var(--color-primary, #0E51BF);
}

.bato-ts-field .bato-input {
    width: 100%;
}

.bato-ts-field .bato-select {
    cursor: pointer;
}



/* bato-font-preview START */
.bato-font-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 10px;
    color: var(--color-text, #5B6068);
}
/* bato-font-preview END */



/* bato-ts-btn START */
.bato-ts-btn {
    --btn-color: var(--color-primary);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 28px;
    background: var(--btn-color);
    border: 1px solid var(--btn-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    color: var(--color-secondary);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: var(--trans);
}

.bato-ts-btn span {
    color: currentColor;
}

.bato-ts-btn path {
    fill: currentColor;
}

.bato-ts-btn_primary-transparent {
    background: transparent;
    color: var(--btn-color);
}

@media (hover: hover) and (pointer: fine) {
    .bato-ts-btn:hover {
        background: var(--color-secondary);
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

    .bato-ts-btn_primary-transparent:hover {
        background: var(--btn-color);
        border-color: var(--btn-color);
        color: var(--color-secondary);
    }
}
/* bato-ts-btn END */



/* bato-ts-notification START */
.bato-ts-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: 500;
}

.bato-ts-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.bato-ts-notification--success {
    background: #10b981;
    color: #fff;
}

.bato-ts-notification--error {
    background: #ef4444;
    color: #fff;
}
/* bato-ts-notification END */



/* color-picker START */
.bato-ts-modal .wp-picker-container {
    width: 100%;
}

.wp-picker-container .wp-color-result.button {
    padding: 0;
    padding-inline-start: 30px;
    padding-inline-end: 1px;
}

.bato-ts-modal .wp-picker-input-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bato-ts-modal .wp-picker-input-wrap label {
    flex: 1;
    display: flex;
    gap: 5px;
    margin: 0
}

.bato-ts-modal .wp-picker-input-wrap input[type=button] {
    flex: 0 0 auto;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    width: 60px;
    height: 24px;
    padding: 5px;
    background: var(--color-secondary);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    line-height: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: var(--trans);
}

.bato-ts-modal .wp-picker-input-wrap input[type=button]:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.bato-ts-modal .wp-picker-container input[type=text].wp-color-picker {
    width: 100%;
    height: 30px;
    min-height: unset;
    line-height: 1;
}

.bato-ts-modal .wp-picker-holder {
    position: absolute;
    z-index: 100;
}

/* color-picker END */



@media screen and (max-width: 575.9px) {
    .bato-ts-modal-toggler {
        bottom: 10px;
        left: 10px;
        width: 30px;
    }
    
    .bato-ts-modal__content {
        width: 95%;
        max-height: 95vh;
    }
    
    .bato-ts-modal__header,
    .bato-ts-tabs__content,
    .bato-ts-modal__footer {
        padding: 10px;
    }

    .bato-ts-modal__footer {
        flex-direction: column;
    }
    
    .bato-ts-tabs__tab {
        padding: 8;
        font-size: 10;
    }

    .bato-ts-tabs__form {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .bato-ts-notification {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .bato-ts-btn {
        width: 100%;
    }
}
