/* 202604 カスタムグループ対応 */

/*custom select*/
/* ============================================================
  基本レイアウト・境界余白設定
============================================================ */
.makeshop-custom-select-wrap {
  display: none;
  margin: 0 !important;
  padding: 0 !important;
}
.makeshop-custom-select-wrap[data-condition-met="1"] {
  display: block !important;
}
.makeshop-custom-select-wrap.makeshop-custom-select-image-button {
  display: none;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
}
.makeshop-custom-select-wrap:not(.makeshop-custom-select-image-button)[data-condition-met="1"] {
  display: block !important;
}
.makeshop-custom-select-wrap:not(.makeshop-custom-select-image-button)[data-condition-met="0"] {
  display: none !important;
}
.ms-cs-modal-body .makeshop-custom-select-wrap {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}
.makeshop-custom-select-wrap.makeshop-custom-select-image-button .makeshop-option-label {
  display: none !important;
}
.makeshop-option-wrap + .ms-cs-trigger-bar,
.makeshop-option-wrap + .makeshop-custom-select-wrap[data-condition-met="1"]:not(.makeshop-custom-select-image-button) {
  margin-top: 40px !important;
}
.ms-cs-trigger-bar + .makeshop-custom-select-wrap[data-condition-met="1"]:not(.makeshop-custom-select-image-button),
.makeshop-custom-select-wrap[data-condition-met="1"]:not(.makeshop-custom-select-image-button) + .makeshop-custom-select-wrap[data-condition-met="1"]:not(.makeshop-custom-select-image-button),
.makeshop-custom-select-wrap[data-condition-met="1"]:not(.makeshop-custom-select-image-button) + .ms-cs-trigger-bar {
  margin-top: 20px !important;
}
.item-quantity {
  margin-top: 40px !important;
  display: flex;
  align-items: center;
}
/* ============================================================
  カード形式（画像付き）
============================================================ */
.ms-cs-trigger-bar + .makeshop-custom-select-wrap .makeshop-option-label {
  display: none !important;
}
.makeshop-custom-select-wrap:empty {
  display: none !important;
}
.ms-cs-trigger-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important; 
  border: 1px solid #e0e0e0 !important; 
  border-radius: 4px;
  background: #ffffff !important; 
  cursor: pointer;
}
.ms-cs-trigger-bar:hover {
  background: #f5f5f5 !important;
}
.ms-cs-current-value {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  margin-left: auto;
  margin-right: 10px;
  color: #000000;
  font-weight: bold;
}
.ms-cs-selected-image-wrap {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  background: #f9f9f9;
  border: 1px solid #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ms-cs-selected-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ms-cs-required {
  color: #e02020 !important;
  font-size: 11px !important;
  margin-left: 4px;
}
/* ============================================================
  モーダル・背景固定設定
============================================================ */
body.ms-modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  width: 100vw !important;
  position: fixed !important;
}
.ms-cs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 200000;
  display: none;
  transition: opacity 0.1s ease-out;
}
.ms-cs-modal-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 90% !important;
  max-width: 600px !important;
  max-height: 80vh !important;
  background: #ffffff;
  z-index: 200001;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: opacity 0.1s ease-out;
}
.ms-cs-modal-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ms-cs-modal-body {
  padding: 12px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
.ms-cs-modal-body .makeshop-custom-select-button {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 12px !important;
  margin-bottom: 8px;
  background: #ffffff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
}
.ms-cs-modal-body .makeshop-custom-select-button:hover {
  background: #f5f5f5 !important;
  border-color: #000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.ms-cs-modal-body .makeshop-custom-select-button.selected {
  border-color: #11D3AD !important;
  background: #f5f5f5 !important;
}
.ms-cs-modal-body .makeshop-custom-select-image {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
  flex-shrink: 0;
}
.ms-cs-modal-close {
  font-size: 24px !important;
  cursor: pointer;
}
.ms-cs-modal-body .makeshop-option-label {
  display: none !important;
}
/* ============================================================
  ラジオボタン形式
============================================================ */
.makeshop-custom-select-radio-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px 0;
}
.makeshop-custom-select-radio-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  flex: 0 1 auto;
}
.makeshop-custom-select-radio {
  display: none !important;
}
.makeshop-custom-select-radio-text::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-right: 8px; 
  background: #fff;
  transition: all 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}
.makeshop-custom-select-radio-text::after {
  content: "";
  position: absolute;
  left: 5px; 
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 10px;
  height: 10px;
  background: #ea8f8f;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.makeshop-custom-select-radio:checked + .makeshop-custom-select-radio-text::before {
  border-color: #ea8f8f;
}
.makeshop-custom-select-radio:checked + .makeshop-custom-select-radio-text::after {
  transform: translateY(-50%) scale(1);
}
.makeshop-custom-select-radio-text {
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #333;
  line-height: 1.2;
}
/* ============================================================
  数値入力形式
============================================================ */
.makeshop-custom-select-text {
  padding-top: 15px;
}
.makeshop-custom-select-text .makeshop-custom-select-text-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 15px;
}
.ms-cs-stepper-btn {
  cursor: pointer;
  font-size: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #ffffff;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ms-cs-stepper-btn:hover {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
}
.makeshop-custom-select-text-wrap .makeshop-custom-select-text {
  border: 1px solid #e0e0e0 !important;
  border-radius: 0 !important;
  width: 70px !important;
  height: 44px !important;
  text-align: center !important;
  font-size: 18px !important;
  background: #ffffff !important;
  appearance: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.makeshop-custom-select-text::-webkit-outer-spin-button,
.makeshop-custom-select-text::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
/* ============================================================
  プルダウン形式
============================================================ */
.makeshop-custom-select-wrap .makeshop-option-select-wrap::after {
  display: none !important;
}
.makeshop-custom-select-wrap .makeshop-option-select {
  appearance: none !important;
  width: 100%;
  height: 50px;
  padding: 0 40px 0 15px;
  border: 1px solid #e0e0e0 !important;
  background: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 15px center !important;
  background-size: 14px !important;
  cursor: pointer;
}
/* ============================================================
  カード形式
============================================================ */
.makeshop-custom-select-button:not(.makeshop-custom-select-image-button) .makeshop-custom-select-button-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px 0;
}
.makeshop-custom-select-button:not(.makeshop-custom-select-image-button) .makeshop-custom-select-button {
  width: auto !important;
  padding: 10px 20px !important;
  border-radius: 4px !important;
  border: 1px solid #e0e0e0 !important;
  background: #ffffff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.makeshop-custom-select-button:not(.makeshop-custom-select-image-button) .makeshop-custom-select-button:hover {
  background: #f5f5f5 !important;
}
.makeshop-custom-select-button:not(.makeshop-custom-select-image-button) .makeshop-custom-select-button.selected {
  background: #ea8f8f !important;
  border-color: #ea8f8f !important;
  color: #ffffff !important;
}
