/*
 * customizer-core.css
 * Default core CSS for all Customizer elements.
 */
.customizer-hidden {
    display: none !important;
}

.customizer-disabled,
.customizer-disabled * {
    color: #808080 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.customizer-pointer-events-none {
    pointer-events: none !important;
}

.customizer-pointer-events-auto {
    pointer-events: auto !important;
}

.customizer-element-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.customizer-element-group-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 16px;
}


/*****************************************************************************
* Image Upload Element
*****************************************************************************/
.customizer-image-upload-element.customizer-element .customizer-thumbnail {
    width: 58px;
    height: 40px;
    border: 1px solid grey;
}

.customizer-image-upload-element.customizer-element .customizer-image-upload-modal-body-container-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    opacity: 0.8;
    pointer-events: none;
}

.customizer-image-upload-element.customizer-element .customizer-image-upload-modal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 80%;
    max-width: 600px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.customizer-image-upload-element.customizer-element .customizer-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
}

.customizer-image-upload-element.customizer-element .customizer-image-manipulation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.customizer-image-upload-element.customizer-element .customizer-image-upload-element-button,
.customizer-image-upload-element.customizer-element .customizer-image-clear-element-button {
    border: 1px solid rgba(0, 0, 0, 0.5);
    display: inline-flex;
    margin-right: 20px;
    padding: 5px;
    cursor: pointer;
}

.customizer-image-upload-element.customizer-element .customizer-image-clear-element-button {
    margin-right: 0;
}

.customizer-image-upload-element.customizer-element .customizer-image-upload-modal-body {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.customizer-tab-name,
.customizer-summary-item,
.customizer-saved-item-remove,
.customizer-saved-item-image,
.customizer-perspective,
.customizer-material-name,
.customizer-list-element-html-item,
.list-element-spinner-button {
    cursor: pointer;
}

.customizer-validation-message {
    color: #ff0000;
    margin-top: 10px;
}

.customizer-element-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
} 
/*****************************************************************************
* Image Upload Overlay
*****************************************************************************/
.customizer-image-upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 100;
}

/*****************************************************************************
* Image Upload Placement Modal Body Container
*****************************************************************************/
.customizer-image-upload-modal .customizer-image-upload-modal-body-container {
    overflow: hidden;
    width: 533px;
    height: 269px;
    border: 1px solid #000;
    position: relative;
}

/*****************************************************************************
* Uploaded Images Grid
*****************************************************************************/
.image-upload-uploaded-images-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 58px));
    gap: 10px;
    margin-top: 15px;
}

/*****************************************************************************
* SVG Interaction Element Defaults
*****************************************************************************/
.customizer-element.customizer-svg-interaction-element .svg-interaction-element-display-container svg {
    width: 100%;
    height: 100%;
}
.customizer-svg-interaction-element {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}
.customizer-svg-interaction-element .svg-interaction-element-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.customizer-svg-interaction-element .svg-interaction-element-display-container {
    width: 100%;
    max-width: 100%;
    border: 1px solid #000;
    height: 200px;
    display: none;
}
.customizer-svg-interaction-element .svg-interaction-element-path-previews-title.customizer-hidden,
.customizer-svg-interaction-element .svg-interaction-element-gradients-previews-title.customizer-hidden {
    display: none;
}
.customizer-svg-interaction-element .svg-interaction-element-path-previews,
.customizer-svg-interaction-element .svg-interaction-element-gradients-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.customizer-svg-interaction-element .svg-interaction-element-actions {
    display: none;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-element-gradient-color-swatch {
    display: inline-block; 
    border: 1px solid #ccc; 
    width: calc(100% / 3 - 7px); 
    height: 40px; 
    cursor: pointer;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-stop-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #eee;
    padding: 5px;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-stop-swatch  {
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-stop-options-container {
    display: none;
    margin-top: 5px;
}

.customizer-element.customizer-svg-interaction-element .gradient-stop-option-button {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-element-color-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-element-color-button {
    width: calc(100% / 3 - 7px); 
    height: 40px;
}

.customizer-element.customizer-svg-interaction-element .svg-interaction-element-gradient-editor {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.customizer-element.customizer-svg-interaction-element
  .svg-interaction-element-path-preview {
  display: inline-block;
  border: 1px solid #ccc;
  width: calc(100% / 3 - 7px);
  height: 40px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

/*****************************************************************************
* List Element Images
*****************************************************************************/
.customizer-list-element-images-item {
    width: 100px;
    min-width: 100px;
    height: 100px;
    object-fit: cover;
}

/*****************************************************************************
* Data Upload Element Label
*****************************************************************************/
.customizer-data-upload-element-label {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #000;
}

/*****************************************************************************
* AI Image Element Layout
*****************************************************************************/
.ai-image-element-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}
.ai-image-display {
    min-height: 256px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ai-image-spinner {
    display: none;
}
.ai-image-display-img {
    max-width: 100%;
    max-height: 512px;
}
.ai-image-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ai-image-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.ai-image-prompt-input {
    width: 100%; 
    min-height: 80px; 
    padding: 0.5rem;
}
.ai-image-history-container {
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    max-height: 200px; 
    overflow-y: auto;
}

.ai-image-history-item {
    padding: 0.5rem; 
    background: #f5f5f5; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: background 0.2s ease;
}

/*****************************************************************************
* Tab 
*****************************************************************************/
.customizer-tab-body-elements {
    display: flex;
    flex-direction: column;
    grid-gap: 16px;
}

/*****************************************************************************
* Tab Icon Default Hidden
*****************************************************************************/
.customizer-tab-icon {
    display: none;
}

/*****************************************************************************
* Loader Overlay and Spinner
*****************************************************************************/
.customizer-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 9998;
}
.customizer-loader-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9998;
}
.customizer-loader svg {
    width: 100px;
    height: 100px;
    position: relative;
    z-index: 9999;
}
/*****************************************************************************
* Saved Item
*****************************************************************************/
.customizer-saved-item-loader {
    display: block; 
    margin: 0 auto;
}

.customizer-saved-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
    text-decoration: none;
    padding: 8px;
    margin-top: 8px;
    border-radius: 8px;
}

.customizer-saved-item-remove:hover {
    text-decoration: none;
    color: #fff;
}

.customizer-saved-item {
    border: 1px solid rgba(0, 0, 0, 0.176);
    border-radius: 8px;
    padding: 8px;
}

#customizer-saved-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/*****************************************************************************
* Embroidery Element
*****************************************************************************/
.embroidery-element-color-picker-button {
    width: 40px; 
    height: 40px;
}

/*****************************************************************************
* Input Element
*****************************************************************************/

/* Container for the font selector */
.input-element.customizer-element .input-element-font-selector-container {
    position: relative;
    display: inline-block;
    width: 220px;
}

/* The area that shows the currently selected font */
.input-element.customizer-element .selected-font-display {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px;
}

/* Add an arrow icon using a pseudo-element */
.input-element.customizer-element .selected-font-display::after {
    content: "▼";
    font-size: 0.7em;
    color: #666;
    margin-left: 8px;
}

/* The dropdown menu container */
.input-element.customizer-element .font-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Each item in the dropdown menu */
.input-element.customizer-element .font-dropdown-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Hover state for dropdown items */
.input-element.customizer-element .font-dropdown-item:hover {
    background-color: #f0f0f0;
}

/* The preview image for each font */
.input-element.customizer-element .font-preview-image {
    width: 100%;
    max-width: 100%;
    height: 30px;
    object-fit: contain;
}

.input-element.customizer-element .input-element-color-picker-button {
    width: 40px;
    height: 40px;
}   


/*****************************************************************************
* Customizer Tooltip
*****************************************************************************/
.customizer-tooltip {
    position: absolute;
    z-index: 1000;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 200px;
}

.customizer-tooltip.customizer-hidden {
    display: none !important;
}

.customizer-tooltip-image {
    display: block;
    max-width: 100%;
    height: auto;
}

/*****************************************************************************
* Modal
*****************************************************************************/
.customizer-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.customizer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.customizer-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    margin-top: 24px;
}

.customizer-modal-wrapper {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 24px 50px;
    border: 1px solid #888;
    max-width: 870px;
    width: 100%;
}

.customizer-modal-body {
    padding: 24px 0;
}

.customizer-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.customizer-modal-close:hover,
.customizer-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.customizer-modal-body-item-image {
    max-width: 100%;
    height: auto; 
    display: block;
}

/*****************************************************************************
* List Element
*****************************************************************************/
.list-element-spinner-container {
    display: flex;
    will-change: transform;
    /* Optimizes for animations */
    transition: transform 0.3s ease-in-out;
    /* Smooth transition for the transform */
}

.list-element-spinner {
    margin-top: 10px;
    padding: 0px;
    width: 100%;
    max-width: 222px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    border: 1px solid grey;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    /* Prevent flex items from shrinking smaller than their content */
    justify-content: center;
    /* Center the items horizontally */
}

.list-element-spinner-button {
    min-width: 30px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    text-align: center;
    z-index: 1;
}

.list-element-spinner-item {
    width: 100%;
    /* max-width: 160px; */
    text-overflow: ellipsis;
    text-align: center;
    line-height: 50px;
    position: relative;
    left: 0px;
    flex: 0 0 auto;
    /* Prevent items from growing or shrinking */
    white-space: nowrap;
    overflow: hidden;
}

.list-element-spinner-item.selected {
    font-weight: bold;
    color: #333;
}

.list-element-spinner-button.list-element-spinner-button-left {
    border-right: 1px solid grey;
    position: absolute;
    left: 0px;
    background: white;
    z-index: 1;
}

.list-element-spinner-button.list-element-spinner-button-right {
    border-left: 1px solid grey;
    position: absolute;
    right: 0px;
    background: white;
    z-index: 1;
}

.customizer-list-element-html {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.customizer-list-element-html-item {
    display: flex;
    padding: 4px;
    border-radius: 16px;
    color: #004c59;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
    background: #ffffff;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: solid;
    height: 35px;
    padding: 4px;
    text-transform: uppercase;
}

.customizer-summary-item-name,
.customizer-summary-item-upcharge,
.customizer-material-group-name,
.customizer-material-group-upcharge {
    display: inline-flex;
    align-items: center;
}

.customizer-element-value-container {
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    grid-gap: 16px;
}

/*****************************************************************************
* Information Element
*****************************************************************************/
.customizer-information-element-body {
    display: flex;
    flex-direction: column;
    grid-gap: 16px;
}

/*****************************************************************************
* Quantity Element
*****************************************************************************/
.customizer-quantity-element-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

/*****************************************************************************
* Data Upload Element
*****************************************************************************/
.customizer-data-upload-element .customizer-element-title {
    display: block;
}

.customizer-preview-modal {
    padding: 16px 0;
}

.customizer-data-upload-element-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/*****************************************************************************
* Responsive Accordion Tab
*****************************************************************************/
.customizer-tab {
  position: relative;
}

.customizer-tab-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease;
}

/* Accordion Tab Styling */
.customizer-accordion-tab {
  width: calc(100vw - 32px);
  max-width: 100vw;
  margin: 16px auto;
  box-sizing: border-box;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

@media (min-width: 600px) {
  .customizer-accordion-tab {
    width: calc(100% - 64px);
    max-width: 700px;
    margin: 24px auto;
  }
}

.customizer-accordion-tab-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
  position: relative;
  transition: background-color 0.3s ease;
}

.customizer-accordion-tab-header:hover {
  background-color: #f0f0f0;
}

.customizer-accordion-tab-name {
  flex-grow: 1;
  font-weight: 600;
  color: #333;
}

.customizer-tab-icon {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto; /* Align to the right */
  transition: transform 0.3s ease;
}

body.accordion-mode .tab-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* adjust this based on the required breakpoint */
@media only screen and (max-width: 768px) {
  body.accordion-mode .customizer-tab-icon {
    display: flex !important;
  }
  body.accordion-mode .customizer-tab-body {
    padding: 12px 16px;
  }
}

body.accordion-mode .customizer-tab-header {
  padding: 12px 16px;
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
}

.customizer-accordion-tab-icon {
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.customizer-accordion-tab-expanded .customizer-accordion-tab-icon {
  transform: rotate(180deg);
}

.customizer-accordion-tab-body {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-top: none;
  background-color: #fff;
}

.customizer-accordion-tab-description {
  margin-bottom: 16px;
  color: #666;
}

.customizer-accordion-tab-body-elements {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Status indicators */
.customizer-accordion-tab.customizer-tab-invalid {
  border-color: #ff5252;
}

.customizer-accordion-tab.customizer-tab-invalid .customizer-accordion-tab-header {
  background-color: rgba(255, 82, 82, 0.05);
}

.customizer-accordion-tab.customizer-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.customizer-accordion-tab.customizer-hidden {
  display: none;
}

/* Tooltip for accordion tabs */
.customizer-accordion-tab-tip {
  display: none;
}

.customizer-accordion-tab-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 0;
}

.customizer-accordion-tab-expanded .customizer-accordion-tab-body {
  max-height: none;
  opacity: 1;
}

body.accordion-mode #customizer-tab-body-container {
  display: none !important;
}

.customizer-tab-icon svg {
  transition: transform 0.3s ease;
}


