@font-face {
    font-family: est;
    src: url(est.woff2) format("woff2");
}
.swal2-container.swal2-rtl.swal2-center.swal2-backdrop-show {
    z-index: 99999 !important;
}
.woofront-edit-btn {
    background: #0041d4 !important;
    color: white !important;
    border: none !important;
    min-width: 20px !important;
    min-height: 20px !important;
    width: 20px !important;
    height: 20px !important;	
    max-width: 20px !important;
    max-height: 20px !important;	
    padding: 15px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    transition: none !important;
}
.woofront-edit-btn .dashicons {
    font-family: 'dashicons' !important;
}
.woofront-edit-btn:hover { 
	background: #083aad; 

}
.woocommerce ul.products li.product { position: relative; }
.woofront-tabs {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, 1fr);
}

.woofront-tab {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    background: #f0f0f0;
    color: #333;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    border-radius: 5px;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.woofront-tab.active {
    background: #0041d4 !important;
    color: white !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.woofront-tab:hover:not(.active) {
    background: #e0e0e0 !important;
    color: black !important;
}

.woofront-tab-content {
    display: none;
    padding: 15px 0;
}

.woofront-tab-content.active {
    display: block;
}

.woofront-modal-container {
    text-align: right;
    direction: rtl;
    font-family: est, Tahoma, Arial, sans-serif;
}

.woofront-modal-container label {
    display: block;
    margin-bottom: 0px;
    font-weight: bold;
    color: #23282d;
}
.woofront-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.woofront-check-items {
	border-radius: 5px;
	font-size: 14px;
	font-weight: normal; 
	display: flex; 
	align-items: center; 
	background: #fff; 
	padding: 5px; 
	border-bottom: 1px solid #eee;
}
#woofront-new-cat-parent, .woofront-modal-container input[type="text"], .woofront-modal-container textarea {
    width: 100%;
    padding: 5px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    height: 40px !important;
}

.woofront-modal-container .woofront-no-access {
    color: #d63638;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #fff8f8;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
}

.woofront-tab-content input[type="number"] {
    -moz-appearance: textfield;
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
	height: 40px !important;
	text-align: right;
}
.woofront-tab-content input[type="number"]::-webkit-outer-spin-button,
.woofront-tab-content input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woofront-price-content {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: space-between;
}

.woofront-price-field {
    width: 50%;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 5px;
}
.woofront-price-preview {
	width: 100%;
}
h1#swal2-title,
h2#swal2-title,
h3#swal2-title,
h4#swal2-title,
h5#swal2-title,
h6#swal2-title {
    font-size: 22px;
    font-family: 'est';
}

/* Live editor style */
.woofront-editor-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.woofront-editor-section,
.woofront-preview-section {
    display: flex;
    flex-direction: column;
}

.woofront-editor-section label,
.woofront-preview-section label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
    font-size: 14px;
}

/* Editor toolbar */
.woofront-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
}

.woofront-format-btn {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    padding: 5px 10px !important;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px !important;
}

.woofront-format-btn:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.woofront-format-btn:active {
    background: #e5e5e5;
}

.woofront-format-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.woofront-toolbar-separator {
    width: 1px;
    background: #dcdcde;
    margin: 4px 4px;
}

/* Editor */
.woofront-live-editor {
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #dcdcde;
    border-radius: 0 0 4px 4px;
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.woofront-live-editor:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.woofront-live-editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
}

/* Preview */
.woofront-live-preview {
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 2px dashed #dcdcde;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 14px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.woofront-live-preview p {
    margin: 0 0 10px;
}

.woofront-live-preview ul,
.woofront-live-preview ol {
    margin: 10px 0;
    padding-right: 20px;
}

.woofront-live-preview li {
    margin-bottom: 5px;
}

.woofront-live-preview strong {
    font-weight: 700;
}

.woofront-live-preview em {
    font-style: italic;
}

.woofront-live-preview u {
    text-decoration: underline;
}
.woofront-add-new {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: nowrap;
    background: #fff !important;
    border-radius: 5px;
}
#woofront-add-category, #woofront-add-brand, #woofront-add-category, #woofront-add-tag, .woofront-add-term, .woofront-add-gallery, .woofront-select-featured, #woofront-add-attribute {
    background: #0041d4 !important;
    color: white !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 40px !important;
    justify-content: center;
    min-height: 40px !important;
    max-height: 40px !important;
}
.woofront-attr-header {
	display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #ffffff;
    border-radius: 4px;
}
.woofront-clear-gallery {
    font-size: 14px !important;
    font-weight: normal !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 40px !important;
    justify-content: center;	
}
.woofront-attributes-manager {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    grid-auto-flow: row;
    align-content: start; /* جلوگیری از کشیده شدن بیش از حد */
}
.woofront-add-attribute-form {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}
.woofront-attr-terms {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;	
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(1, 1fr);	
}

.woofront-categories-list, .woofront-brands-list, .woofront-tags-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f5f5f5;
    margin-top: 10px;
    border-radius: 5px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #dddddd;
}
.woofront-remove-featured, .woofront-remove-gallery {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #dc3232 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
    min-height: 20px !important;
	font-family: 'dashicons' !important;
}
.woofront-gallery-item img {
    border: 2px solid #0041d4;
    padding: 10px;
    border-radius: 5px;
}
.woofront-image-preview img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #0041d4;
    padding: 10px;
}
.woofront-gallery-section,
.woofront-image-section {
    border: 1px solid #c1c1c1;
    border-radius: 5px;
    padding: 20px;
	margin: 20px 0;
}
button.swal2-confirm.swal2-styled {
    background: #0041d4 !important;
    color: white !important;
    border-radius: 5px !important;
    border: none !important;
    font-family: 'est' !important;
}
button.swal2-cancel.swal2-styled {
    background: #5b5c5c !important;
    color: white !important;
    border-radius: 5px !important;
	border: none !important;
    font-family: 'est' !important;
}
.woofront-cat-name,
.woofront-brand-name,
.woofront-tag-name,
.woofront-term-name {
    font-size: 12px;
    font-weight: normal;
}
.woofront-attr-group {
	margin-bottom: 20px; 
	padding: 15px; 
	background: #f9f9f9; 
	border: 1px solid #ddd; 
	border-radius: 6px;
}
.woofront-tab-content label {
    margin: 5px 0px;
    font-size: 16px;
}
.woofront-check-items-in {
    flex: 1;
    display: flex !important;
    align-items: center;
    padding: 0 5px;
    gap: 5px;
}
.woofront-cat-checkbox,
.woofront-brand-checkbox,
.woofront-attr-term,
.woofront-tag-checkbox {
    width: 15px;
}
.woofront-gallery-container {
	display: flex; 
	flex-wrap: wrap; 
	gap: 10px; 
	margin-top: 10px; 
	min-height: 100px; 
	padding: 20px; 
	border: 1px solid #ddd; 
	border-radius: 6px; 
	background: #f9f9f9;
}
/* Custom scroll bar */
.woofront-live-editor::-webkit-scrollbar,
.woofront-live-preview::-webkit-scrollbar {
    width: 8px;
}

.woofront-live-editor::-webkit-scrollbar-track,
.woofront-live-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.woofront-live-editor::-webkit-scrollbar-thumb,
.woofront-live-preview::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.woofront-live-editor::-webkit-scrollbar-thumb:hover,
.woofront-live-preview::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


.woofront-categories-manager .woofront-add-new input, .woofront-brands-manager .woofront-add-new input {
    padding: 6px 8px;
    margin-left: 5px;
    height: 40px;
}
.woofront-edit-cat, .woofront-delete-cat, .woofront-edit-brand, .woofront-delete-brand, .woofront-delete-tag, .woofront-edit-tag, .woofront-delete-term, .woofront-edit-term {
    font-size: 11px !important;
    padding: 2px 6px !important;
    margin-left: 4px !important;
    min-height: 30px !important;
    height: 30px !important;
    line-height: 1.5 !important;
    background: #0041d4 !important;
    color: #fff !important;
    font-weight: normal !important;
}
.woofront-delete-cat, .woofront-delete-brand, .woofront-delete-tag, .woofront-delete-term {
    background: #dc3232 !important;
    color: white !important;
    padding: 0 10px !important;
}
button.woofront-delete-attr.button.button-small.button-link-delete, 
button.woofront-edit-attr.button.button-small {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    min-height: 30px !important;
    border: 1px solid #cbcbcb !important;
    background: #fff !important;
    color: #7a7676 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

button.woofront-edit-attr.button.button-small:hover {
    background: #f0f0f0 !important;
    color: #2271b1 !important;
    border-color: #2271b1 !important;
}

button.woofront-delete-attr.button.button-small.button-link-delete:hover {
    background: #f0f0f0 !important;
    color: #d63638 !important;
    border-color: #d63638 !important;
}

button.woofront-delete-attr svg,
button.woofront-edit-attr svg {
    display: block !important;
}

.woofront-attr-header {
	display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #e7e7e7;
    border-radius: 4px;	
}
/* Responsive */
@media (max-width: 768px) {
	.woofront-tabs,
	.woofront-attributes-manager,
	.woofront-categories-list, .woofront-brands-list, .woofront-tags-list {
		grid-template-columns: repeat(2, 1fr);
	}
	.woofront-price-content {
		flex-direction: column;
	}
	.woofront-price-field {
		width: 100%;
	}
    .woofront-editor-wrapper {
        grid-template-columns: 1fr;
    }
    
    .woofront-swal-popup {
        width: 95% !important;
    }
}