.sectionly-options-container {
  margin-top: var(--po-spacing-marginTop, 12px);
  margin-bottom: var(--po-spacing-marginBottom, 12px);
  font-family: inherit;
  color: #121212;
}

.sectionly-option-field {
  position: relative;
}

.sectionly-option-label {
  display: block;
  margin-bottom: var(--po-spacing-betweenLabelAndControl, 6px);
  font-size: var(--po-typography-optionLabelSize, 13px);
  font-weight: 600;
  color: var(--po-color-general-optionLabel, #121212);
}

.sectionly-required {
  color: var(--po-color-general-errorMessage, #bf0711);
  margin-left: 4px;
  font-weight: 500;
}

.sectionly-input,
.sectionly-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--po-color-textInput-borderUnselected,#c4cdd5);
  border-radius: var(--po-shape-textInputBorderRadius, 3px);
  font-size: var(--po-typography-inputTextSize, 14px);
  transition: border-color 0.1s ease-in-out;
  background-color: #fff;
  color: var(--po-color-textInput-textEnteredValue,#121212);
  line-height: 1.5;
}

.sectionly-input:hover,
.sectionly-textarea:hover {
  border-color: var(--po-color-textInput-borderUnselected,#919eab);
}

.sectionly-input:focus,
.sectionly-textarea:focus {
  border-color: var(--po-color-textInput-borderSelected,#121212);
  outline: none;
  box-shadow: 0 0 0 1px var(--po-color-textInput-borderSelected,#121212);
}

.sectionly-input::placeholder,
.sectionly-textarea::placeholder,
.sectionly-phone-input::placeholder {
  color: var(--po-color-textInput-textPlaceholder, #9ca3af);
  opacity: 1;
}

.sectionly-help-text {
  margin-top: 4px;
  font-size: var(--po-typography-helpTextSize, 12px);
  color: var(--po-color-general-helpText, #637381);
  line-height: 1.4;
}

/* Below label help text should not add extra top gap */
.sectionly-option-label + .sectionly-help-text {
  margin-top: 0;
  margin-bottom: 6px;
}

.sectionly-field-error {
  margin-top: 4px;
  font-size: var(--po-typography-errorMessageSize, 12px);
  color: var(--po-color-general-errorMessage, #bf0711);
  line-height: 1.4;
}

.sectionly-error {
  color: var(--po-color-general-errorMessage, #bf0711);
  font-size: var(--po-typography-errorMessageSize, 12px);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.sectionly-error::before {
  content: "•";
  margin-right: 6px;
  font-size: 16px;
}

.sectionly-error-field {
  border-color: var(--po-color-general-errorMessage, #bf0711) !important;
}

.sectionly-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  border-top-color: #121212;
  animation: sectionly-spin 0.8s infinite linear;
}

@keyframes sectionly-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Phone Number Input Styles */
.sectionly-phone-container {
  display: flex;
  gap: 0;
  border: 1px solid var(--po-color-textInput-borderUnselected,#c4cdd5);
  border-radius: var(--po-shape-textInputBorderRadius, 3px);
  overflow: visible;
  transition: border-color 0.1s ease-in-out;
  background-color: #fff;
  position: relative;
}

/* match input focus style */
.sectionly-phone-container:focus-within {
  border-color: var(--po-color-textInput-borderSelected,#121212);
  box-shadow: 0 0 0 1px var(--po-color-textInput-borderSelected,#121212);
}

.sectionly-phone-container:hover {
  border-color: var(--po-color-textInput-borderUnselected,#919eab);
}

.sectionly-phone-container.sectionly-error-field {
  border-color: var(--po-color-general-errorMessage, #bf0711) !important;
}

/* Country Selector */
.sectionly-country-selector {
  position: relative;
  display: flex;
  flex-shrink: 0;
}

.sectionly-country-selected {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background-color: #f9fafb;
  border-right: 1px solid #c4cdd5;
  cursor: pointer;
  transition: background-color 0.1s ease-in-out;
  min-width: 80px;
  user-select: none;
  /* keep corners consistent with text input */
  border-top-left-radius: var(--po-shape-textInputBorderRadius, 3px);
  border-bottom-left-radius: var(--po-shape-textInputBorderRadius, 3px);
}

.sectionly-country-selected:hover {
  background-color: #f1f3f4;
}

.sectionly-country-flag {
  width: 20px;
  height: 15px;
  display: inline-block;
  margin-right: 8px;
  /* Fallback for emoji flags if flag-icons fails */
  font-size: 16px;
  line-height: 1;
}

.sectionly-country-code {
  font-size: var(--po-typography-optionValueSize, 13px);
  font-weight: 500;
  color: #121212;
  min-width: 30px;
}

.sectionly-dropdown-arrow {
  font-size: 10px;
  color: #637381;
  transition: transform 0.2s ease;
}

.sectionly-country-selector[data-open="true"] .sectionly-dropdown-arrow {
  transform: rotate(180deg);
}

.sectionly-country-selector[data-open="true"] .sectionly-country-selected {
  background-color: #f1f3f4;
  /* keep smooth curvature when open */
  border-bottom-left-radius: var(--po-shape-textInputBorderRadius, 3px);
}

/* Country Dropdown */
.sectionly-country-dropdown {
  position: absolute;
  top: calc(100% - 1px); /* overlap 1px to avoid seam */
  left: 0;
  width: 280px;
  background: #fff;
  border: 1px solid #c4cdd5;
  border-radius: 0; /* dropdown fixed square corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 240px;
  overflow: hidden;
}

/* Responsive adjustment for narrow containers */
@media (max-width: 400px) {
  .sectionly-country-dropdown {
    right: 0;
    left: auto;
    width: 90vw;
    max-width: 320px;
  }
}

.sectionly-country-search {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  font-size: var(--po-typography-inputTextSize, 13px);
  outline: none;
  background-color: #f9fafb;
}

.sectionly-country-search::placeholder {
  color: #9ca3af;
}

.sectionly-countries-list {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for webkit browsers */
.sectionly-countries-list::-webkit-scrollbar {
  width: 6px;
}

.sectionly-countries-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.sectionly-countries-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.sectionly-countries-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.sectionly-country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: var(--po-typography-optionValueSize, 13px);
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f3f4f6;
}

.sectionly-country-item:last-child {
  border-bottom: none;
}

.sectionly-country-item:hover {
  background-color: #f8fafc;
}

.sectionly-country-item.selected {
  background-color: #e7f3ff;
  color: #0969da;
  font-weight: 500;
}

.sectionly-country-item .sectionly-country-flag {
  width: 20px;
  height: 15px;
  display: inline-block;
  margin-right: 8px;
  /* Fallback for emoji flags if flag-icons fails */
  font-size: 14px;
  min-width: 20px;
}

.sectionly-country-item .sectionly-country-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sectionly-country-item .sectionly-country-code {
  font-size: var(--po-typography-helpTextSize, 12px);
  color: #637381;
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

/* Phone Input */
.sectionly-phone-input {
  width: 100%;
  flex: 1;
  padding: 8px 10px;
  border: none !important;
  font-size: var(--po-typography-inputTextSize, 14px);
  background-color: transparent;
  color: var(--po-color-textInput-textEnteredValue,#121212);
  outline: none;
  line-height: 1.5;
  box-shadow: none !important;
  /* ensure right side follows container curvature */
  border-top-right-radius: var(--po-shape-textInputBorderRadius, 3px);
  border-bottom-right-radius: var(--po-shape-textInputBorderRadius, 3px);
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}


/* Responsive Design */
@media (max-width: 768px) {
  .sectionly-phone-container {
  }

  .sectionly-country-selected {
    border-right: none;
    border-bottom: 1px solid var(--po-color-textInput-borderUnselected,#c4cdd5);
    justify-content: space-between;
  }

  .sectionly-country-dropdown {
    width: calc(100vw - 32px);
    max-width: 320px;
    max-height: 60vh;
    left: 0;
  }

  .sectionly-country-item {
    padding: 12px 16px;
    font-size: 14px;
  }

  .sectionly-country-search {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* Accessibility */
.sectionly-country-selector:focus-within .sectionly-country-selected {
  outline: 2px solid #0969da;
  outline-offset: 2px;
}

.sectionly-country-item:focus {
  outline: 2px solid #0969da;
  outline-offset: -2px;
}

/* Animation for dropdown */
@keyframes sectionly-dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sectionly-country-dropdown {
  animation: sectionly-dropdown-fade-in 0.15s ease-out;
}

/* Custom scrollbar for countries list */
.sectionly-countries-list::-webkit-scrollbar {
  width: 6px;
}

.sectionly-countries-list::-webkit-scrollbar-track {
  background: #f1f3f4;
}

.sectionly-countries-list::-webkit-scrollbar-thumb {
  background: #c4cdd5;
  border-radius: 3px;
}

.sectionly-countries-list::-webkit-scrollbar-thumb:hover {
  background: #919eab;
}

@media (max-width: 768px) {
  .sectionly-option-field {
    margin-bottom: 10px;
  }

  .sectionly-input,
  .sectionly-textarea,
  .sectionly-select {
    padding: 8px 10px;
    font-size: 16px; /* Larger font size on mobile devices for better readability */
  }
}

.sectionly-radio-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* margin-bottom: 8px; */
}

.sectionly-radio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background-color: var(--po-color-button-backgroundUnselected, #fff);
  border: 2px solid var(--po-color-button-borderUnselected, #dddddd);
  border-radius: var(--po-shape-buttonBorderRadius, 4px);
  cursor: pointer;
  font-size: var(--po-typography-optionValueSize, 14px);
  line-height: 34px;
  font-weight: 400;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 60px;
  max-width: fit-content;
  flex: 0 0 auto;
  color: var(--po-color-button-textUnselected, #000);
  position: relative;
  white-space: nowrap;
}
.sectionly-radio-selected-display-style {
  font-size: small;
}

.sectionly-radio-button:hover {
  border-color: var(--po-color-button-borderHover, #7d7d7d);
}

.sectionly-radio-button-selected {
  font-weight: 500;
  background-color: var(--po-color-button-backgroundSelected, #121212);
  color: var(--po-color-button-textSelected, #fff);
  border: 2px solid var(--po-color-button-borderSelected, #121212);
}
.sectionly-radio-button .sectionly-additional-price {
  margin-left: 4px;
  font-weight: normal;
  color: var(--po-color-button-textUnselected, #000);
}

.sectionly-radio-button-selected .sectionly-additional-price {
  color: var(--po-color-button-textSelected, #fff);
}

.sectionly-radio-button-selected:hover {
  border: 2px solid var(--po-color-button-borderSelected, #121212);
}

.sectionly-radio-button-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .sectionly-radio-button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .sectionly-radio-button-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .sectionly-radio-button {
    width: auto;
    min-width: 60px;
    flex: 0 0 auto;
    justify-content: center;
  }
}

/* Checkbox Styles */
.sectionly-checkbox-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.sectionly-checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.sectionly-checkbox-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.sectionly-options-container .sectionly-checkbox-input {
  width: 16px;
  height: 16px;
  margin: 0;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--po-color-checkbox-backgroundSelected, #121212);
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--po-color-checkbox-borderUnselected, #c4cdd5);
  border-radius: var(--po-shape-checkboxBorderRadius, 3px);
  background-color: var(--po-color-checkbox-backgroundUnselected, #fff);
  position: relative;
  transition: all 0.2s ease;
}

.sectionly-checkbox-input:checked {
  border-color: var(--po-color-checkbox-borderSelected, #121212);
  background-color: var(--po-color-checkbox-backgroundSelected, #121212);
}

.sectionly-checkbox-input:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--po-color-checkbox-checkmarkSelected, #fff);
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}


.sectionly-checkbox-input:hover {
  border-color: var(--po-color-checkbox-borderUnselected, #919eab);
}

.sectionly-checkbox-input:checked:hover {
  border-color: var(--po-color-checkbox-borderSelected, #0c0c0c);
}

.sectionly-checkbox-label {
  font-size: var(--po-typography-optionValueSize, 14px);
  color: var(--po-color-general-optionValue, #121212);
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.sectionly-checkbox-selected-display-style {
  font-size: small;
  color: #666;
  margin-bottom: 0;
  min-height: 16px;
}

/* Select Styles */
.sectionly-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  background:  var(--po-color-dropdown-menuBackground,#fff); /* 避免残留背景 */
  border-radius: var(--po-shape-dropdownBorderRadius, 3px);
}

.sectionly-select {
  width: 100%;
  padding: 8px 32px 8px 10px;
  border: 1px solid var(--po-color-dropdown-menuBorder,#c4cdd5);
  border-radius: var(--po-shape-dropdownBorderRadius, 3px);
  font-size: var(--po-typography-optionValueSize, 14px);
  color: var(--po-color-general-optionValue, #121212);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent; /* 避免残留背景 */
  transition: border-color 0.1s ease-in-out;
  line-height: 1.5;
}

.sectionly-select:hover {
  border-color: var(--po-color-dropdown-menuBorder,#919eab);
}

.sectionly-select:focus {
  outline: none;
  border-color: var(--po-color-dropdown-menuBorder,#121212);
  box-shadow: 0 0 0 1px #121212;
}

.sectionly-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--po-color-dropdown-menuBorder,#666);
  transition: color 0.1s ease-in-out;
}

.sectionly-select-wrapper:hover .sectionly-select-arrow {
  color: var(--po-color-dropdown-menuBorder,#121212);
}

/* Error States */
.sectionly-field-error .sectionly-checkbox-item {
  border-left: 2px solid var(--po-color-general-errorMessage, #d72c0d);
  padding-left: 6px;
}

.sectionly-field-error .sectionly-select {
  border-color: var(--po-color-general-errorMessage, #d72c0d);
  box-shadow: 0 0 0 1px var(--po-color-general-errorMessage, #d72c0d);
}

.sectionly-field-error-message {
  color: var(--po-color-general-errorMessage, #d72c0d);
  font-size: var(--po-typography-errorMessageSize, 12px);
  margin-top: 4px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .sectionly-checkbox-group {
    /* gap: 6px; */
  }

  .sectionly-checkbox-item {
    padding: 6px 0;
  }

  .sectionly-checkbox-input {
    width: 18px;
    height: 18px;
  }

  .sectionly-checkbox-label {
    font-size: 16px;
  }

  .sectionly-select {
    padding: 10px 32px 10px 12px;
    font-size: 16px;
  }
}

/* Number Input Styles */
.sectionly-input[type="number"] {
  /* Specific styles for number input if needed */
  min-height: 37px; /* Ensure consistent height */
}

/* Heading Styles */
.sectionly-heading-field {
  /* margin-top: 15px;
  margin-bottom: 15px; */
}

.sectionly-heading {
  font-family: inherit;
  margin: 0;
  padding: 0;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.5;
}

.sectionly-heading-small {
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 6px;
}

.sectionly-heading-large {
  font-size: 24px;
  font-weight: 700;
  padding-bottom: 10px;
}

/* Divider Styles */
.sectionly-divider-field {
  /* margin-top: 15px;
  margin-bottom: 15px; */
}

.sectionly-divider {
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
  .sectionly-heading {
    font-size: 16px;
  }

  .sectionly-heading-small {
    font-size: 14px;
  }

  .sectionly-heading-large {
    font-size: 20px;
  }
}

.sectionly-options-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

[element-id] {
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: var(--po-spacing-betweenOptions, 12px);
}
.sectionly-group-container > .sectionly-components-wrapper > [element-id] {
  margin-bottom: 5px;
  padding: 0;
}

.sectionly-group-container
  > .sectionly-components-wrapper
  > [element-id]:last-child {
  margin-bottom: 0;
}

.sectionly-group-container .sectionly-options-row [element-id] {
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: var(--po-spacing-betweenOptions, 12px);
}

.sectionly-options-container sectionly-option-group {
  margin-bottom: 5px;
}

/* Non-collapsible group: remove outer margin */
.sectionly-options-container sectionly-option-group.sectionly-non-collapsible {
  margin-bottom: 0;
}
.sectionly-width-100 {
  width: 100%;
}

.sectionly-width-75 {
  width: 75%;
}

.sectionly-width-66 {
  width: 66.66%;
}

.sectionly-width-50 {
  width: 50%;
}

.sectionly-width-33 {
  width: 33.33%;
}

.sectionly-width-25 {
  width: 25%;
}

/* Respect configured widths on mobile; removed rule that forced 100% */

@media (max-width: 1024px) and (min-width: 769px) {
  .sectionly-width-33,
  .sectionly-width-25 {
    width: 50%;
  }
}

.sectionly-input-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
  border: 1px solid #c4cdd5;
  border-radius: var(--po-shape-textInputBorderRadius, 3px);
  background-color: #fff;
}

.sectionly-input-prefix {
  padding: 0 0 0 8px;
  background-color: transparent;
  border: none;
  color: #121212;
  white-space: nowrap;
  font-size: 12px;
  display: flex;
  align-items: center;
  /* border-right: 1px solid var(--color-border, #c4cdd5); */
  min-width: 32px;
  justify-content: center;
  font-weight: 500;
}

.sectionly-input-suffix {
  padding: 0 8px 0 0;
  background-color: transparent;
  border: none;
  color: #637381;
  white-space: nowrap;
  font-size: 12px;
  display: flex;
  align-items: center;
  /* border-left: 1px solid var(--color-border, #c4cdd5); */
}

.sectionly-input-wrapper .sectionly-input,
.sectionly-input-wrapper .sectionly-textarea {
  flex: 1;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.sectionly-input-wrapper .sectionly-input:focus,
.sectionly-input-wrapper .sectionly-textarea:focus {
  position: relative;
  z-index: 1;
  box-shadow: none;
}

.sectionly-input-wrapper:focus-within {
  border-color: #121212;
  box-shadow: 0 0 0 1px #121212;
}

.sectionly-input-prefix + .sectionly-input,
.sectionly-input-prefix + .sectionly-textarea,
.sectionly-input + .sectionly-input-suffix,
.sectionly-textarea + .sectionly-input-suffix,
.sectionly-input-prefix + .sectionly-input + .sectionly-input-suffix,
.sectionly-input-prefix + .sectionly-textarea + .sectionly-input-suffix {
  border-radius: 0;
}

@media (max-width: 768px) {
  .sectionly-input-wrapper {
    flex-wrap: nowrap;
  }

  .sectionly-input-prefix,
  .sectionly-input-suffix {
    padding: 8px;
    font-size: 14px;
  }
}

.sectionly-input-wrapper .sectionly-textarea {
  height: auto;
  min-height: 37px;
}

.sectionly-input-wrapper .sectionly-input-prefix,
.sectionly-input-wrapper .sectionly-input-suffix {
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* Switch Element Styles */
.sectionly-switch-container {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.sectionly-switch-button {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: var(--po-color-switch-backgroundUnselected, #c4cdd5);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  outline: none;
  padding: 0;
}

.sectionly-switch-button:hover {
  background-color: var(--po-color-switch-backgroundUnselected, #919eab);
}

.sectionly-switch-button:focus {
  outline: none;
}

.sectionly-switch-button:focus-visible {
  box-shadow: 0 0 0 2px #121212;
}

.sectionly-switch-button.sectionly-switch-on {
  background-color: var(--po-color-switch-backgroundSelected, #121212);
}

.sectionly-switch-button.sectionly-switch-on:hover {
  background-color: var(--po-color-switch-backgroundSelected, #2c2c2c);
}

.sectionly-switch-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sectionly-switch-button.sectionly-switch-on .sectionly-switch-slider {
  transform: translateX(20px);
}

/* Error state for switch */
.sectionly-switch-container.sectionly-error-field .sectionly-switch-button {
  background-color: var(--po-color-general-errorMessage, #bf0711);
  box-shadow: 0 0 0 1px var(--po-color-general-errorMessage, #bf0711);
}

.sectionly-switch-container.sectionly-error-field
  .sectionly-switch-button.sectionly-switch-on {
  background-color: var(--po-color-general-errorMessage, #8b0408);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sectionly-switch-button {
    width: 40px;
    height: 22px;
  }

  .sectionly-switch-slider {
    width: 18px;
    height: 18px;
  }

  .sectionly-switch-button.sectionly-switch-on .sectionly-switch-slider {
    transform: translateX(18px);
  }
}

.sectionly-price-preview {
  margin-top: 15px;
  font-family: inherit;
}

.sectionly-additional-fees {
  margin-top: 8px;
  font-size: 0.9em;
  color: #666;
  line-height: 1.4;
}

.sectionly-additional-fees > div {
  margin-bottom: 4px;
  padding: 4px 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sectionly-additional-fees > div:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .sectionly-price-preview {
    margin-top: 12px;
  }

  .sectionly-additional-fees {
    font-size: 0.85em;
  }
}

/* Image Picker Styles (formerly image-swatch) */
.sectionly-image-picker-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 100%;
}

/* 响应式布局 - 平板端适配 */
@media (max-width: 768px) and (min-width: 481px) {
  .sectionly-image-picker-group[data-items-per-row="2"] {
    grid-template-columns: repeat(2, 1fr);
  }
  .sectionly-image-picker-group[data-items-per-row="3"] {
    grid-template-columns: repeat(3, 1fr);
  }
  .sectionly-image-picker-group[data-items-per-row="4"] {
    grid-template-columns: repeat(3, 1fr); /* 减少到3列 */
  }
  .sectionly-image-picker-group[data-items-per-row="5"],
  .sectionly-image-picker-group[data-items-per-row="6"],
  .sectionly-image-picker-group[data-items-per-row="7"],
  .sectionly-image-picker-group[data-items-per-row="8"] {
    grid-template-columns: repeat(3, 1fr); /* 高密度时减少到3列 */
  }
}

/* 移动端适配 */
@media (max-width: 480px) {
  /* 默认自动响应式（2列） */
  .sectionly-image-picker-group {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px;
  }

  /* 移动端特定配置 */
  .sectionly-image-picker-group[data-mobile-items-per-row="2"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .sectionly-image-picker-group[data-mobile-items-per-row="3"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* auto 保持默认的2列 */
  .sectionly-image-picker-group[data-mobile-items-per-row="auto"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Dynamic columns based on itemsPerRow setting */
.sectionly-image-picker-group[data-items-per-row="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="5"] {
  grid-template-columns: repeat(5, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="6"] {
  grid-template-columns: repeat(6, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="7"] {
  grid-template-columns: repeat(7, 1fr);
}

.sectionly-image-picker-group[data-items-per-row="8"] {
  grid-template-columns: repeat(8, 1fr);
}

.sectionly-image-picker-group.sectionly-error-field {
  border: 1px solid #e74c3c;
  border-radius: 4px;
  padding: 5px;
}

.sectionly-image-picker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.sectionly-image-picker-container:hover {
  /* transform: translateY(-2px); */
}

.sectionly-image-picker-selected-container .sectionly-image-picker-label {
  font-weight: 600;
  color: #121212;
}

.sectionly-image-picker-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 8px;
  border: 1px solid var(--po-color-imageSwatches-borderUnselected,#c4cdd5);
}

.sectionly-image-picker-item:hover {
  opacity: 0.9;
}

.sectionly-image-picker-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 2px solid #fff;
}

.sectionly-image-picker-selected {
  border-color: var(--po-color-imageSwatches-borderSelected,#121212);
  border: 2px solid var(--po-color-imageSwatches-borderSelected,#121212);
}

.sectionly-image-picker-label {
  font-size: var(--po-typography-optionValueSize, 12px);
  text-align: center;
  padding: 2px 4px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* 优化高密度布局的文字显示 */
.sectionly-image-picker-group[data-items-per-row="6"]
  .sectionly-image-picker-label {
  font-size: 11px;
  padding: 1px 2px;
}

.sectionly-image-picker-group[data-items-per-row="7"]
  .sectionly-image-picker-label {
  font-size: 10px;
  padding: 1px 2px;
}

.sectionly-image-picker-group[data-items-per-row="8"]
  .sectionly-image-picker-label {
  font-size: 9px;
  padding: 1px 1px;
}

.sectionly-image-picker-label .sectionly-additional-price {
  font-size: 0.9em;
}

.sectionly-option-label .sectionly-additional-price {
  font-weight: normal;
}

/* 旧的移动端规则已移至上方响应式布局中 */

/* Group Element Styles */
.sectionly-group-field {
  position: relative;
  /* overflow: hidden; */
  border-bottom: 1px solid #e5e5e5;
}

.sectionly-group-field.sectionly-no-header {
  border-bottom: none;
  margin-bottom: 0;
}

.sectionly-group-field.sectionly-title-only {
  border-bottom: none;
  margin-bottom: 0;
}

.sectionly-group-field.sectionly-non-collapsible .sectionly-accordion-header {
  cursor: default;
}

.sectionly-group-container {
  margin-top: 0;
  transition: border-color 0.1s ease-in-out;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.sectionly-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 12px 0;
  transition: background-color 0.2s ease;
}

.sectionly-accordion-header:hover {
}

.sectionly-accordion-title {
  font-size: var(--po-typography-optionLabelSize, 14px);
  font-weight: 600;
  color: var(--po-color-general-optionLabel, #121212);
  flex: 1;
  display: flex;
  align-items: center;
}

.sectionly-accordion-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.sectionly-accordion-content {
  border-top: none;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: height;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
}

/* Child element styling */
.sectionly-group-container .sectionly-child-element {
  position: relative;
  margin-bottom: 10px;
  display: block;
}

.sectionly-child-element:last-child {
  padding-bottom: 0;
}

/* Responsive styles for group */
@media (max-width: 768px) {
  .sectionly-group-container {
    padding: 10px 5px 5px 5px;
  }
}

.sectionly-error-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #bf0711;
  margin-right: 8px;
  position: relative;
}

.sectionly-error-indicator:before {
  content: "!";
  color: white;
  font-size: 8px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sectionly-components-wrapper {
  padding-bottom: 15px;
}

.sectionly-group-field.sectionly-no-header .sectionly-components-wrapper {
  padding-bottom: 0;
}

.sectionly-group-field.sectionly-title-only .sectionly-components-wrapper {
  padding-bottom: 0;
}

@media (max-width: 768px) {
  .sectionly-components-wrapper {
    padding-bottom: 10px;
  }
  .sectionly-group-field.sectionly-no-header .sectionly-components-wrapper {
    padding-bottom: 0;
  }
  .sectionly-group-field.sectionly-title-only .sectionly-components-wrapper {
    padding-bottom: 0;
  }
}

.sectionly-additional-price {
  color: #637381;
  font-size: 0.9em;
  font-weight: normal;
  margin-left: 4px;
  display: inline-block;
}

/* Radio button tooltip styles */
.sectionly-radio-button {
  position: relative;
}

.sectionly-tooltip {
  position: absolute;
  background: var(--po-color-button-tooltipBackground, #212b36);
  color: var(--po-color-button-tooltipText, #ffffff);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: var(--po-typography-helpTextSize, 12px);
  line-height: 1.5;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.sectionly-radio-button:hover .sectionly-tooltip {
  opacity: 1;
}

/* Help icon next to label */
.sectionly-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #c4cdd5;
  color: #6d7175;
  font-size: 11px;
  line-height: 14px;
  margin-left: 6px;
  position: relative;
  vertical-align: text-bottom;
  cursor: default;
}

.sectionly-help-icon .sectionly-tooltip {
  position: absolute;
  background: #212b36;
  color: white;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: var(--po-typography-helpTextSize, 12px);
  line-height: 1.4;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  max-width: 20rem;
  width: max-content;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.sectionly-help-icon:hover .sectionly-tooltip {
  opacity: 1;
}

.sectionly-radio-button-group.sectionly-error-field {
  border: 1px solid #e74c3c;
  border-radius: 4px;
  padding: 5px;
}

.sectionly-selected-value-display {
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--po-color-general-selectedOptionValue, #121212);
}

.sectionly-note-wrapper {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  background-color: var(--po-color-note-containerBackground, #f9fafb);
  border-radius: 6px;
  border: 1px solid var(--po-color-note-containerBorder, #e5e7eb);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.sectionly-note-icon {
  margin-right: 10px;
  flex-shrink: 0;
  color: var(--po-color-note-icon, #374151);
}

.sectionly-note-icon svg {
  display: block;
}

.sectionly-note-text-content {
  flex-grow: 1;
}

.sectionly-note-title {
  font-weight: 600;
  font-size: 1em;
  color: var(--po-color-note-titleText, #111827);
  margin-bottom: 4px;
  line-height: 1.4;
}

.sectionly-note-main-content {
  font-size: 0.95em;
  color: var(--po-color-note-bodyText, #374151);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .sectionly-note-wrapper {
    padding: 10px;
  }
  .sectionly-note-title {
    font-size: 0.95em;
  }
  .sectionly-note-main-content {
    font-size: 0.9em;
  }
}

/* Learn More Element Styles */
.sectionly-learn-more-field {
  margin-bottom: 16px;
  position: relative;
}

.sectionly-learn-more-description {
  margin: 0;
  line-height: 1.5;
  font-size: var(--po-typography-helpTextSize, 14px);
  color: #333;
}

.sectionly-learn-more-button {
  display: inline-block;
  background: none;
  border: none;
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: var(--po-typography-helpTextSize, 14px);
  font-weight: 500;
  margin: 0;
  transition: color 0.2s ease;
}

.sectionly-learn-more-button:hover {
  color: #004499;
}

/* Drawer Styles */
.sectionly-learn-more-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sectionly-overlay-visible {
  opacity: 1;
  display: block !important;
}

.sectionly-learn-more-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 90%;
  max-width: 450px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 9991;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sectionly-drawer-open {
  transform: translateX(0);
}

.sectionly-hidden {
  display: none !important;
}

.sectionly-learn-more-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e1e3e5;
  background-color: #f9fafb;
}

.sectionly-learn-more-drawer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #212121;
}

.sectionly-learn-more-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.sectionly-learn-more-drawer-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sectionly-learn-more-drawer-content {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
  font-size: var(--po-typography-helpTextSize, 14px);
  line-height: 1.5;
  color: #333;
}

.sectionly-learn-more-drawer-content h1,
.sectionly-learn-more-drawer-content h2,
.sectionly-learn-more-drawer-content h3,
.sectionly-learn-more-drawer-content h4,
.sectionly-learn-more-drawer-content h5,
.sectionly-learn-more-drawer-content h6 {
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  color: #212121;
  font-weight: 600;
}

.sectionly-learn-more-drawer-content h1 {
  font-size: 1.8em;
}
.sectionly-learn-more-drawer-content h2 {
  font-size: 1.6em;
}
.sectionly-learn-more-drawer-content h3 {
  font-size: 1.4em;
}
.sectionly-learn-more-drawer-content h4 {
  font-size: 1.2em;
}
.sectionly-learn-more-drawer-content h5 {
  font-size: 1.1em;
}
.sectionly-learn-more-drawer-content h6 {
  font-size: 1em;
}

.sectionly-learn-more-drawer-content p {
  margin-top: 0;
  margin-bottom: 1em;
}

.sectionly-learn-more-drawer-content ul,
.sectionly-learn-more-drawer-content ol {
  margin-bottom: 1em;
  padding-left: 2em;
}

.sectionly-learn-more-drawer-content li {
  margin-bottom: 0.5em;
}

.sectionly-learn-more-drawer-content img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  display: block;
  border-radius: 4px;
}

.sectionly-learn-more-drawer-content a {
  color: #0066cc;
  text-decoration: underline;
}

.sectionly-learn-more-drawer-content a:hover {
  color: #004499;
}

.sectionly-learn-more-drawer-content blockquote {
  border-left: 4px solid #e1e3e5;
  padding-left: 1em;
  margin-left: 0;
  color: #666;
}

@media (max-width: 768px) {
  .sectionly-learn-more-drawer-panel {
    width: 100%;
    max-width: none;
  }

  .sectionly-learn-more-drawer-content {
    padding: 12px;
  }

  .sectionly-learn-more-drawer-header {
    padding: 12px;
  }
}

.sectionly-group-help-icon {
  margin-left: 8px;
  color: #637381;
  cursor: help;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sectionly-group-help-icon svg {
  width: 14px;
  height: 14px;
}

.sectionly-group-help-tooltip {
  position: absolute;
  background: #212b36;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: var(--po-typography-helpTextSize, 12px);
  font-weight: normal;
  line-height: 1.4;
  text-align: center;
  width: max-content;
  max-width: 150px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  margin-top: 4px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 100;
}

.sectionly-group-help-icon:hover .sectionly-group-help-tooltip {
  opacity: 1;
  visibility: visible;
}

.sectionly-group-help-tooltip::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #212b36;
}

/* ==========================
   Color Swatch Styles
   ========================== */

.sectionly-color-swatch-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.sectionly-color-swatch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.sectionly-color-swatch-container:hover {
  transform: translateY(-2px);
}

/* 悬停标签样式 */
.sectionly-color-swatch-hover-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: var(--po-typography-helpTextSize, 12px);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 1000;
  margin-bottom: 8px;
}

/* 悬停标签的小箭头 */
.sectionly-color-swatch-hover-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
}

/* 悬停时显示标签 */
.sectionly-color-swatch-container:hover .sectionly-color-swatch-hover-label {
  opacity: 1;
  visibility: visible;
}

.sectionly-color-swatch {
  display: block !important;
  width: var(--swatch-size, 40px);
  height: var(--swatch-size, 40px);
  border-radius: 8px;
  border: 2px solid var(--po-color-colorSwatches-borderUnselected,#e1e3e5);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.sectionly-color-swatch:hover {
  border-color: var(--po-color-colorSwatches-borderUnselected,#919eab);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sectionly-color-swatch-selected {
  /* 去掉有色边框，使用白色环形指示器 */
  border: 3px solid var(--po-color-colorSwatches-borderSelected,#ffffff);
  /* 确保在最上层 */
  z-index: 10;
  position: relative;
}

/* Swatch Size Variants */
.sectionly-color-swatch-group[data-swatch-size="small"] {
  --swatch-size: 32px;
}

.sectionly-color-swatch-group[data-swatch-size="medium"] {
  --swatch-size: 40px;
}

.sectionly-color-swatch-group[data-swatch-size="large"] {
  --swatch-size: 48px;
}

/* Swatch Shape Variants */
.sectionly-color-swatch-group[data-swatch-shape="circle"]
  .sectionly-color-swatch {
  border-radius: 50%;
}

.sectionly-color-swatch-group[data-swatch-shape="square"]
  .sectionly-color-swatch {
  border-radius: 4px;
}

/* Error State */
.sectionly-color-swatch-group.sectionly-error-field .sectionly-color-swatch {
  border-color: var(--po-color-general-errorMessage,#d72c0d);
}

.sectionly-color-swatch-group.sectionly-error-field
  .sectionly-color-swatch:hover {
  border-color: var(--po-color-general-errorMessage,#bf0711);
}

/* Grid Layout - 使用固定大小的颜色块 */

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .sectionly-color-swatch-group {
    gap: 8px;
  }
}

/* Accessibility improvements */
.sectionly-color-swatch-container:focus-within .sectionly-color-swatch {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .sectionly-color-swatch-container:hover {
    transform: none;
  }

  .sectionly-color-swatch {
    min-width: 44px;
    min-height: 44px;
  }

  .sectionly-color-swatch-group[data-swatch-size="small"]
    .sectionly-color-swatch {
    min-width: 36px;
    min-height: 36px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .sectionly-color-swatch {
    border-width: 3px;
  }

  .sectionly-color-swatch-selected {
    border-color: #000;
  }

  .sectionly-color-swatch-selected::after {
    color: #000;
    text-shadow: 0 0 2px #fff;
  }
}
/*

File Upload Styles */
.sectionly-file-upload-container {
  border: 1px dashed var(--po-color-fileUpload-containerBorder, #c4cdd5);
  border-radius: 4px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background-color: var(--po-color-fileUpload-containerBackground, #fff);
  margin-bottom: 15px;
}

.sectionly-file-upload-container:hover {
  border-color: var(--po-color-fileUpload-containerBorderHover, #919eab);
  background-color: var(--po-color-fileUpload-containerBackgroundHover, #fafbfc);
}

.sectionly-file-upload-container.sectionly-drag-over {
  border-color: var(--po-color-fileUpload-containerBorderHover, #007c89);
  background-color: #e6f7ff; /* 拖拽时浅色背景 */
  transform: scale(1.02);
}

.sectionly-file-upload-container.sectionly-uploading {
  pointer-events: none;
  opacity: 0.7;
  border-color: var(--po-color-fileUpload-containerBorderHover, #007c89);
}

.sectionly-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sectionly-upload-icon {
  font-size: 20px;
  opacity: 0.7;
}

.sectionly-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sectionly-upload-primary {
  font-size: var(--po-typography-optionLabelSize, 14px);
  font-weight: 500;
  color: var(--po-color-fileUpload-primaryText, #121212);
  transition: color 0.2s ease;
}

.sectionly-file-upload-container:hover .sectionly-upload-primary {
  color: var(--po-color-fileUpload-primaryTextHover, #000000);
}

.sectionly-upload-secondary {
  font-size: var(--po-typography-helpTextSize, 12px);
  color: var(--po-color-fileUpload-secondaryText, #637381);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.sectionly-file-upload-container:hover .sectionly-upload-secondary {
  color: var(--po-color-fileUpload-secondaryTextHover, #374151);
}

.sectionly-upload-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sectionly-upload-progress {
  width: 100%;
  max-width: 300px;
}

.sectionly-progress-bar {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sectionly-progress-fill {
  height: 100%;
  background: var(--po-color-fileUpload-primaryText, #007c89);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.sectionly-progress-text {
  font-size: var(--po-typography-helpTextSize, 14px);
  color: var(--po-color-fileUpload-secondaryText, #637381);
  font-weight: 500;
}

/* Uploaded Files List */
.sectionly-uploaded-files {
  margin-top: 15px;
}

.sectionly-file-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--po-color-fileUpload-containerBorder, #c4cdd5);
  border-radius: 4px;
  margin-bottom: 8px;
  background-color: var(--po-color-fileUpload-containerBackground, #fff);
  transition: all 0.2s ease;
}

.sectionly-file-item:hover {
  border-color: var(--po-color-fileUpload-containerBorder, #919eab);
  background-color: #f3f4f6; /* 悬停时稍深背景 */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sectionly-file-preview {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 3px;
  flex-shrink: 0;
}

.sectionly-file-icon {
  font-size: 16px;
}

.sectionly-file-info {
  flex: 1;
  min-width: 0;
}

.sectionly-file-name {
  font-size: var(--po-typography-optionValueSize, 14px);
  font-weight: 500;
  color: var(--po-color-fileUpload-primaryText, #121212);
  margin-bottom: 2px;
  /* 优化长文件名显示 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.4;
}

.sectionly-file-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--po-color-fileUpload-secondaryText, #6b7280);
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.sectionly-file-remove:hover {
  background-color: var(--po-color-fileUpload-containerBackgroundHover, #f3f4f6);
  color: var(--po-color-fileUpload-secondaryTextHover, #374151);
}

/* Responsive Design for File Upload */
@media (max-width: 768px) {
  .sectionly-file-upload-container {
    padding: 20px 12px;
  }

  .sectionly-upload-icon {
    font-size: 36px;
  }

  .sectionly-upload-primary {
    font-size: 14px;
  }

  .sectionly-upload-secondary {
    font-size: 12px;
  }

  .sectionly-file-item {
    padding: 10px;
  }

  .sectionly-file-preview {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  .sectionly-file-icon {
    font-size: 16px;
  }

  .sectionly-file-name {
    font-size: 13px;
  }
}

/* Error state for file upload */
.sectionly-file-upload-container.sectionly-error-field {
  border-color: var(--po-color-general-errorMessage, #bf0711);
  background-color: #fef2f2; /* 浅红色背景 */
}

.sectionly-file-upload-container.sectionly-error-field:hover {
  border-color: var(--po-color-general-errorMessage, #bf0711);
  background-color: #fef2f2;
}

/* Hide upload area when file limit is reached */
.sectionly-file-upload-container.sectionly-upload-limit-reached
  .sectionly-upload-prompt {
  display: none;
}

.sectionly-file-upload-container.sectionly-upload-limit-reached
  .sectionly-file-input {
  display: none;
}

.sectionly-file-upload-container.sectionly-upload-limit-reached {
  padding: 0;
  border: none;
  background: none;
  margin-bottom: 0;
}

.sectionly-file-upload-container.sectionly-upload-limit-reached:hover {
  border: none;
  background: none;
}

/* File thumbnail styles */
.sectionly-file-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* SVG Icon styles */
.sectionly-upload-svg-icon {
  color: var(--po-color-fileUpload-secondaryText, #6b7280);
  opacity: 0.7;
}

.sectionly-file-svg-icon {
  color: var(--po-color-fileUpload-secondaryText, #6b7280);
}

.sectionly-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover effects for better interactivity */
.sectionly-file-item:hover .sectionly-file-svg-icon {
  color: var(--po-color-fileUpload-secondaryTextHover, #374151);
}

.sectionly-file-upload-container:hover .sectionly-upload-svg-icon {
  color: var(--po-color-fileUpload-secondaryTextHover, #374151);
  opacity: 0.9;
}

/* Error handling styles */
.sectionly-upload-errors {
  margin-top: 15px;
  border-radius: 6px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 12px;
}

.sectionly-upload-error-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  background-color: #ffffff;
  border-radius: 4px;
  border-left: 3px solid #ef4444;
}

.sectionly-upload-error-item:last-child {
  margin-bottom: 0;
}

.sectionly-error-icon {
  color: #ef4444;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.sectionly-error-text {
  flex: 1;
  font-size: var(--po-typography-errorMessageSize, 13px);
  color: #7f1d1d;
  line-height: 1.4;
}

.sectionly-error-dismiss {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  padding: 0;
  margin-left: 8px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.sectionly-error-dismiss:hover {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Success/Warning/Info message styles */
.sectionly-upload-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--po-typography-helpTextSize, 13px);
  animation: slideIn 0.3s ease-out;
}

.sectionly-message-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.sectionly-message-warning {
  background-color: #fefce8;
  border: 1px solid #fde047;
  color: #a16207;
}

.sectionly-message-info {
  background-color: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

.sectionly-message-icon {
  font-weight: bold;
  flex-shrink: 0;
}

.sectionly-message-text {
  flex: 1;
  line-height: 1.4;
}

/* Retry button styles */
.sectionly-retry-all-container {
  margin-top: 12px;
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid #fecaca;
}

.sectionly-retry-all-button {
  background-color: #f97316;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sectionly-retry-all-button:hover {
  background-color: #ea580c;
}

/* Failed file item styles */
.sectionly-file-item-failed {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid #ef4444;
}

.sectionly-file-preview-error {
  background-color: #fee2e2;
}

.sectionly-file-error {
  font-size: var(--po-typography-errorMessageSize, 12px);
  color: #dc2626;
  margin-top: 2px;
  font-style: italic;
}

.sectionly-file-retry {
  background: none;
  border: 1px solid #f97316;
  color: #f97316;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 8px;
  margin-right: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sectionly-file-retry:hover {
  background-color: #f97316;
  color: white;
}

/* File status styles */
.sectionly-file-status {
  font-size: var(--po-typography-helpTextSize, 12px);
  color: var(--po-color-fileUpload-secondaryText, #6b7280);
  margin-top: 2px;
  line-height: 1.3;
}

/* Pending file item styles */
.sectionly-file-item-pending {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-left: 3px solid #6b7280;
}

.sectionly-file-item-pending .sectionly-file-status {
  color: #6b7280;
}

/* Uploading file item styles */
.sectionly-file-item-uploading {
  background-color: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #3b82f6;
}

.sectionly-file-item-uploading .sectionly-file-status {
  color: #3b82f6;
}

/* Status indicator container */
.sectionly-file-status-indicator {
  margin-left: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Status icon base styles */
.sectionly-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* Pending status icon */
.sectionly-status-icon.sectionly-status-pending {
  color: #6b7280;
}

/* Uploading status icon with loading animation */
.sectionly-status-icon.sectionly-status-uploading {
  color: #3b82f6;
}

/* Loading animation for uploading icon */
.sectionly-loading-icon {
  animation: spin 1s linear infinite;
}

/* Success icon */
.sectionly-success-icon {
  color: #10b981;
}

/* Error icon in status indicator */
.sectionly-status-icon .sectionly-error-icon {
  color: #dc3545;
}

/* Spin animation for loading icon */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation keyframes */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sectionly-upload-error-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  background-color: #fff;
  border-radius: 4px;
  border-left: 3px solid #dc3545;
}

.sectionly-upload-error-item:last-child {
  margin-bottom: 0;
}

.sectionly-error-icon {
  color: #dc3545;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 1px;
}

.sectionly-error-text {
  flex: 1;
  font-size: 13px;
  color: #721c24;
  line-height: 1.4;
}

.sectionly-error-dismiss {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.sectionly-error-dismiss:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Success and warning messages */
.sectionly-upload-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 4px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
}

.sectionly-message-success {
  background-color: #d1f2eb;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.sectionly-message-warning {
  background-color: #fef3cd;
  border: 1px solid #fde68a;
  color: #92400e;
}

.sectionly-message-info {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.sectionly-message-icon {
  font-weight: bold;
  flex-shrink: 0;
}

.sectionly-message-text {
  flex: 1;
}

/* Failed file item styles */
.sectionly-file-item-failed {
  border-color: #fecaca;
  background-color: #fef2f2;
}

.sectionly-file-item-failed:hover {
  border-color: #f87171;
}

.sectionly-file-preview-error {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
}

.sectionly-file-error {
  font-size: 12px;
  color: #dc3545;
  margin-top: 2px;
  line-height: 1.3;
}

/* File actions container */
.sectionly-file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.sectionly-file-retry {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--po-color-fileUpload-primaryText, #007c89);
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sectionly-file-retry:hover {
  background-color: var(--po-color-fileUpload-primaryText, #007c89);
  color: white;
  transform: rotate(180deg);
}

/* Enhanced progress indicator */
.sectionly-progress-text {
  font-size: var(--po-typography-helpTextSize, 13px);
  color: #637381;
  font-weight: 500;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sectionly-upload-errors {
    padding: 10px;
  }

  .sectionly-upload-error-item {
    padding: 6px;
    margin-bottom: 6px;
  }

  .sectionly-error-text {
    font-size: 12px;
  }

  .sectionly-upload-message {
    padding: 8px 10px;
    font-size: 12px;
  }

  .sectionly-file-actions {
    gap: 2px;
  }

  .sectionly-file-retry,
  .sectionly-file-remove {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }
}

/* Retry all button styles */
.sectionly-retry-all-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #fecaca;
  text-align: center;
}

.sectionly-retry-all-button {
  background-color: var(--po-color-fileUpload-primaryText, #007c89);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: var(--po-typography-helpTextSize, 13px);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sectionly-retry-all-button:hover {
  background-color: #006570;
  transform: translateY(-1px);
}

.sectionly-retry-all-button:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .sectionly-retry-all-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}
/* Inline selected value next to label */
.sectionly-option-selected-inline {
  margin-left: 6px;
  font-weight: 500;
  color: #374151;
}

/* ==========================
   Image Picker Slider (single row)
   ========================== */

.sectionly-image-slider {
  position: relative;
  width: 100%;
}

.sectionly-image-slider-viewport {
  overflow: hidden;
}

.sectionly-image-slider-track {
  display: flex;
  width: 100%;
  transition: transform 300ms ease;
}

.sectionly-image-slider-page {
  flex: 0 0 100%;
  padding: 0 0 4px 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.sectionly-image-slider-page[data-items-per-row="2"] {
  grid-template-columns: repeat(2, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="3"] {
  grid-template-columns: repeat(3, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="4"] {
  grid-template-columns: repeat(4, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="5"] {
  grid-template-columns: repeat(5, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="6"] {
  grid-template-columns: repeat(6, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="7"] {
  grid-template-columns: repeat(7, 1fr);
}
.sectionly-image-slider-page[data-items-per-row="8"] {
  grid-template-columns: repeat(8, 1fr);
}

@media (max-width: 480px) {
  .sectionly-image-slider-page {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sectionly-image-slider-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.sectionly-image-slider-arrow {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #c4cdd5;
  background: #fff;
  color: #121212;
  border-radius: 4px;
  width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sectionly-image-slider-arrow:hover {
  border-color: #919eab;
}
.sectionly-image-slider-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sectionly-image-slider-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}

.sectionly-image-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4cdd5;
  border: none;
  cursor: pointer;
  padding: 0;
}

.sectionly-image-slider-dot.active {
  background: #121212;
}

/* Unified controls (arrows + dots in one row) */
.sectionly-image-slider-controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sectionly-image-slider-controls .sectionly-image-slider-dots {
  margin-top: 0;
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Modernized arrow look */
.sectionly-image-slider-arrow {
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  box-shadow: none;
  transition:
    background-color 0.15s ease,
    transform 0.05s ease;
  padding: 0;
}

/* Make the left (prev) arrow point left by rotating the SVG */
.sectionly-image-slider-prev svg {
  transform: rotate(180deg);
}

.sectionly-image-slider-arrow:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sectionly-image-slider-arrow:active {
  transform: translateY(1px);
}

/* Thin the SVG ring */
.sectionly-image-slider-arrow svg circle {
  stroke-width: 0.75px;
}

.sectionly-image-slider-arrow:disabled svg circle {
  stroke: #e5e7eb;
}

/* ==========================
   Responsive sizing for arrows
   ========================== */
@media (max-width: 768px) and (min-width: 481px) {
  .sectionly-image-slider-arrow {
    width: 40px;
    height: 40px;
  }
  .sectionly-image-slider-arrow svg {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .sectionly-image-slider-arrow {
    width: 32px;
    height: 32px;
  }
  .sectionly-image-slider-arrow svg {
    width: 28px;
    height: 28px;
  }
}

/* Preview backend: class-based sizing (media queries may not apply) */
.sectionly-mobile-preview .sectionly-image-slider-arrow {
  width: 32px;
  height: 32px;
}
.sectionly-mobile-preview .sectionly-image-slider-arrow svg {
  width: 28px;
  height: 28px;
}

/* ===== 图片选择器悬停预览样式 ===== */
.sectionly-image-picker-with-preview .sectionly-image-picker-container {
  position: relative;
}

.sectionly-image-hover-preview-individual {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 1500;
  background-color: var(--po-color-imageSwatches-hoverBackground,#f8f9fa);
  border-radius: 4px;
  padding: 4px 8px;
  width: max-content;
  max-width: 12rem;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 初始状态：隐藏 */
  opacity: 0;
  visibility: hidden;

  /* 动画效果：从下往上淡入 */
  transition: all 0.2s ease-out;
}

/* 悬停时显示预览框 */
.sectionly-image-picker-with-hover-preview:hover
  .sectionly-image-hover-preview-individual {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 预览框内容样式 */
.sectionly-preview-title {
  text-align: center;
  font-weight: 500;
  font-size: var(--po-typography-optionValueSize, 13px);
  color: var(--po-color-imageSwatches-hoverText,#1f2937);
  line-height: 1.2;
}

.sectionly-preview-price {
  text-align: center;
  color: var(--po-color-imageSwatches-hoverText,#1f2937);
  font-size: var(--po-typography-helpTextSize, 12px);
  line-height: 1.2;
}

.sectionly-preview-image {
  margin-top: 4px;
  width: 120px;
  height: 120px;
}

.sectionly-preview-image img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sectionly-preview-placeholder {
  width: 100%;
  height: 100px;
  background-color: #f5f5f5;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 11px;
}

/* 添加小箭头指向图片 */
.sectionly-image-hover-preview-individual::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #f8f9fa;
}

.sectionly-image-hover-preview-individual::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #e5e7eb;
  z-index: -1;
}
