/* ===================================
   Button Component System
   Professional & Consistent Styling
   =================================== */

/* ------------------------------------
 * Base Button Styles
 * ------------------------------------ */
.ec-blockBtn,
.ec-inlineBtn,
.modal-btn,
.mypage-btn-min,
.mypage-btn-min-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border-radius: 48px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Remove all focus outlines and shadows */
.ec-blockBtn:focus,
.ec-blockBtn:focus-visible,
.ec-inlineBtn:focus,
.ec-inlineBtn:focus-visible,
.modal-btn:focus,
.modal-btn:focus-visible,
.mypage-btn-min:focus,
.mypage-btn-min:focus-visible,
.mypage-btn-min-outline:focus,  /* 追加 */
.mypage-btn-min-outline:focus-visible {  /* 追加 */
  outline: none;
  box-shadow: none;
}

/* Remove active state effects */
button:active,
a:active,
[role="button"]:active,
input[type="button"]:active,
input[type="submit"]:active {
  transform: none;
  box-shadow: none;
}

/* Remove all hover opacity changes globally */
a[class*="ec-blockBtn--"]:hover,
a.ec-blockBtn--primary:hover,
.ec-footerRole a.ec-blockBtn--primary:hover,
a.mypage-btn-min:hover,  /* 追加 */
a.mypage-btn-min-outline:hover {  /* 追加 */
  opacity: 1;
}

/* ------------------------------------
 * Size Variants
 * ------------------------------------ */
/* Large Block Button (56px) */
.ec-blockBtn {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  font-size: 16px;
}

/* Standard Inline Button (44px) */
.ec-inlineBtn,
.modal-btn {
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
}

/* Small Button (32px) */
.mypage-btn-min,
.mypage-btn-min-outline {
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
}

@media (max-width: 767px) {
  .ec-blockBtn {
    height: 48px;
    font-size: 14px;
  }
  .mypage-btn-min,
  .mypage-btn-min-outline {
    height: 30px;
    padding: 0 14px;
    font-size: 12px;
  }
}
/* ------------------------------------
 * Primary Button (Navy #1d385c)
 * ------------------------------------ */
.ec-blockBtn--action,
.ec-blockBtn--primary,
.modal-btn-action,
.modal-btn-complete,
.mypage-btn-min:not(.-delete):not(.-gray),
.ec-cartRole__side__coupon__input button {
  color: #ffffff;
  background-color: #1d385c;
  border-color: #1d385c;
}

.ec-blockBtn--action:hover,
.ec-blockBtn--action:active,
.ec-blockBtn--primary:hover,
.ec-blockBtn--primary:active,
.modal-btn-action:hover,
.modal-btn-action:active,
.modal-btn-complete:hover,
.modal-btn-complete:active,
.mypage-btn-min:not(.-delete):not(.-gray):hover,
.mypage-btn-min:not(.-delete):not(.-gray):active,
.ec-cartRole__side__coupon__input button:hover:not(:disabled),
.ec-cartRole__side__coupon__input button:active:not(:disabled) {
  background-color: #2d5a8f;
  border-color: #2d5a8f;
  color: #ffffff;
}

/* Primary disabled state */
.ec-blockBtn--action:disabled,
.ec-blockBtn--primary:disabled,
.modal-btn-action:disabled,
.ec-cartRole__side__coupon__input button:disabled {
  background-color: #9aa7b8;
  border-color: #9aa7b8;
  color: #eef2f6;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}

/* Primary Outline Variant */
.mypage-btn-min-outline:not(.-delete):not(.-gray) {
  color: #1d385c;
  background-color: #ffffff;
  border-color: #1d385c;
}

.mypage-btn-min-outline:not(.-delete):not(.-gray):hover,
.mypage-btn-min-outline:not(.-delete):not(.-gray):active {
  background-color: #f4f4f4;
  border-color: #2d5a8f;
  color: #1d385c;
}

/* ------------------------------------
 * Secondary Button (Beige #c3976f)
 * ------------------------------------ */
.ec-blockBtn--primary {
  color: #ffffff;
  background-color: #c3976f;
  border-color: #c3976f;
}

.ec-blockBtn--primary:hover,
.ec-blockBtn--primary:active {
  background-color: #cda782;
  border-color: #cda782;
  color: #ffffff;
}

.ec-blockBtn--primary:disabled {
  background-color: #d7c3b2;
  border-color: #d7c3b2;
  color: #f4efe9;
  cursor: not-allowed;
  pointer-events: none;
}

/* With next arrow icon */
.ec-blockBtn--primary.-next {
  column-gap: 8px;
}

.ec-blockBtn--primary.-next::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: url(../icon/icon_next.svg) no-repeat center;
  background-size: contain;
}

/* ------------------------------------
 * Cancel/Gray Button (#747474)
 * ------------------------------------ */
.ec-blockBtn--cancel,
.modal-btn-cancel,
.modal-btn.btn-link,
.mypage-btn-min.-gray {
  color: #ffffff;
  background-color: #747474;
  border-color: #747474;
}

.ec-blockBtn--cancel:hover,
.ec-blockBtn--cancel:active,
.modal-btn-cancel:hover,
.modal-btn-cancel:active,
.modal-btn.btn-link:hover,
.modal-btn.btn-link:active,
.mypage-btn-min.-gray:hover,
.mypage-btn-min.-gray:active {
  background-color: #808080;
  border-color: #808080;
  color: #ffffff;
}

.ec-blockBtn--cancel:disabled {
  background-color: #b5b5b5;
  border-color: #b5b5b5;
  color: #eeeeee;
  cursor: not-allowed;
  pointer-events: none;
}

/* Cancel Outline Variant */
.ec-blockBtn--cancel-outline {
  color: #747474;
  background-color: #ffffff;
  border: 2px solid #747474;
}

.ec-blockBtn--cancel-outline:hover,
.ec-blockBtn--cancel-outline:active {
  background-color: #f5f5f5;
  border-color: #666666;
  color: #666666;
}

/* Gray Outline Variant */
.mypage-btn-min-outline.-gray {
  color: #414241;
  background-color: #ffffff;
  border-color: #414241;
}

.mypage-btn-min-outline.-gray:hover,
.mypage-btn-min-outline.-gray:active {
  background-color: #f4f4f4;
  color: #414241;
}

/* ------------------------------------
 * Danger Button (Red #de5d50)
 * ------------------------------------ */
.ec-btn-outline-danger,
.mypage-btn-min.-delete,
.mypage-btn-min-outline.-delete {
  color: #de5d50;
  background-color: #ffffff;
  border-color: #de5d50;
}

.ec-btn-outline-danger:hover,
.ec-btn-outline-danger:active,
.mypage-btn-min.-delete:hover,
.mypage-btn-min.-delete:active,
.mypage-btn-min-outline.-delete:hover,
.mypage-btn-min-outline.-delete:active {
  background-color: #fef5f4;
  border-color: #d34b3f;
  color: #de5d50;
}

.ec-btn-outline-danger:disabled,
.mypage-btn-min.-delete:disabled,
.mypage-btn-min-outline.-delete:disabled {
  color: #f0b6ae;
  border-color: #f0b6ae;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

/* Danger solid variant (for delete/suspend/resume/discard/alert modals) */
#confirmDeleteModal .modal-btn-complete,
#confirmSuspendModal .modal-btn-complete,
#confirmResumeModal .modal-btn-complete,
#confirmDiscardModal .modal-btn-complete,
#alertModal .modal-btn-complete {
  background-color: #de5d50;
  border-color: #de5d50;
}

#confirmDeleteModal .modal-btn-complete:hover,
#confirmDeleteModal .modal-btn-complete:active,
#confirmSuspendModal .modal-btn-complete:hover,
#confirmSuspendModal .modal-btn-complete:active,
#confirmResumeModal .modal-btn-complete:hover,
#confirmResumeModal .modal-btn-complete:active,
#confirmDiscardModal .modal-btn-complete:hover,
#confirmDiscardModal .modal-btn-complete:active,
#alertModal .modal-btn-complete:hover,
#alertModal .modal-btn-complete:active {
  background-color: #d34b3f;
  border-color: #d34b3f;
  color: #ffffff;
}

/* ------------------------------------
 * Outline Dark Button
 * ------------------------------------ */
.ec-inlineBtn.btn-outline-dark,
.ec-orderOrder__block .btn-outline-dark {
  color: #212529;
  background-color: #ffffff;
  border-color: #212529;
}

.ec-inlineBtn.btn-outline-dark:hover,
.ec-inlineBtn.btn-outline-dark:active,
.ec-orderOrder__block .btn-outline-dark:hover,
.ec-orderOrder__block .btn-outline-dark:active {
  background-color: #f4f4f4;
  border-color: #212529;
  color: #212529;
}

.ec-inlineBtn.btn-outline-dark:disabled,
.ec-orderOrder__block .btn-outline-dark:disabled {
  color: #9aa0a6;
  background-color: #f7f7f7;
  border-color: #c6c7c9;
  pointer-events: none;
  opacity: 1;
}

/* ------------------------------------
 * Link Style Button
 * ------------------------------------ */
.ec-linkBtn:is(button, a) {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  color: #de5d50;
  transition: all 0.2s ease;
}

.ec-linkBtn:is(button, a):hover,
.ec-linkBtn:is(button, a):active {
  text-decoration: underline;
  color: #de5d50;
}

.ec-linkBtn:is(button, a):disabled,
.ec-linkBtn:is(button, a)[aria-disabled="true"] {
  color: #f0b6ae;
  cursor: not-allowed;
  pointer-events: none;
}

/* ------------------------------------
 * LINE Button (Green #06c755)
 * ------------------------------------ */
.ec-blockBtn--line {
  color: #ffffff;
  background-color: #06c755;
  border-color: #06c755;
}

.ec-blockBtn--line:hover,
.ec-blockBtn--line:active {
  background-color: #05b04d;
  border-color: #05b04d;
  color: #ffffff;
}

.ec-blockBtn--line::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314"/></svg>')
    no-repeat center;
  background-size: contain;
  margin-right: 8px;
}

@media (max-width: 767px) {
  .ec-blockBtn--line::before {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }
}

/* ------------------------------------
 * Loading State
 * ------------------------------------ */
.ec-blockBtn--action.is-loading,
.modal-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.ec-blockBtn--action.is-loading::after,
.modal-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.8s linear infinite;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------
 * Icon Integration (Font Awesome)
 * ------------------------------------ */
/* Delete/Remove Icons */
button[class*="delete"]:not(.cart-quantity-control):not([class*="subscription__controls"])::before,
button[class*="remove"]:not(.cart-quantity-control):not([class*="subscription__controls"])::before,
.ec-btn-outline-danger::before,
.mypage-btn-min.-delete::before,
.mypage-btn-min-outline.-delete::before,
a[class*="delete"]::before,
a[class*="remove"]::before {
  content: "\f00d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
  display: inline-block;
}

/* Add Icons */
button[class*="add"]:not(.cart-quantity-control):not([class*="subscription__controls"])::before,
.mypage-btn-min[class*="add"]::before,
.mypage-btn-min-outline[class*="add"]::before,
a[class*="add"]::before {
  content: "\f067";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
  display: inline-block;
}

/* Edit Icons */
.mypage-btn-min[class*="edit"]::before,
.mypage-btn-min-outline[class*="edit"]::before {
  content: "\f303";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
  display: inline-block;
}

/* Upload Icons */
button.btn-upload::before,
button[class*="upload"]::before,
a.btn-upload::before,
a[class*="upload"]::before {
  content: "\f03e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
  display: inline-block;
  color: #525263;
}

/* Disable icons for quantity controls */
.cart-quantity-control::before,
.ec-cartRole__main__subscription__controls button.plus::before,
.ec-cartRole__main__subscription__controls button.minus::before {
  content: none;
  display: none;
}

/* ------------------------------------
 * Modal Buttons Layout
 * ------------------------------------ */
.modal-buttons,
:is(.registration_page, .mypage) .modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ------------------------------------
 * Specific Page Overrides
 * ------------------------------------ */
/* Register Page */
.ec-registerRole .ec-blockBtn--action:hover:not(:disabled),
.ec-registerRole .ec-blockBtn--action:active:not(:disabled) {
  background-color: #2d5a8f;
  border-color: #2d5a8f;
  color: #ffffff;
}

/* Login Page */
#page_shopping_login .ec-login .ec-blockBtn--cancel:hover:not(:disabled),
#page_shopping_login .ec-login .ec-blockBtn--cancel:active:not(:disabled) {
  background-color: #808080;
  border-color: #808080;
  color: #ffffff;
}

#page_shopping_login .ec-login .ec-login__link .ec-blockBtn:hover,
#page_shopping_login .ec-login .ec-login__link .ec-blockBtn:active {
  background-color: #cda782;
  color: #ffffff;
}

/* Footer overrides to ensure white text */
.ec-footerRole .ec-blockBtn--primary,
.ec-footerRole .ec-blockBtn--primary:hover,
.ec-footerRole .ec-blockBtn--primary:focus,
.ec-footerRole .ec-blockBtn--primary:active {
  color: #ffffff;
}

/* ------------------------------------
 * Product Page Buy Tabs
 * ------------------------------------ */
.ec-productRole__buyTab li a {
  outline: none;
}

.ec-productRole__buyTab li a::before {
  display: none;
}

.ec-productRole__buyTab li a span {
  position: relative;
  font-weight: 500;
  padding-left: 32px;
  display: inline-block;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="white" stroke="%23cccccc" stroke-width="2"/></svg>');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 24px 24px;
  transition: all 0.2s ease;
}

.ec-productRole__buyTab li a:hover span,
.ec-productRole__buyTab li a:active span {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23f7f7f7" stroke="%23aaaaaa" stroke-width="2"/></svg>');
}

.ec-productRole__buyTab li a.is-active span,
.ec-productRole__buyTab li.is-active a span {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="white" stroke="%23e94f2a" stroke-width="2"/><circle cx="12" cy="12" r="5" fill="%23e94f2a"/></svg>');
}

/* Recommend badge */
.ec-productRole .ec-productRole__buyTab > li:last-child::after {
  content: "";
  display: block;
  width: 89px;
  height: 28px;
  background: url(../icon/icon_recommend.svg) no-repeat;
  background-size: contain;
  position: absolute;
  top: -12px;
  right: -5px;
  z-index: 1;
}

.ec-mypage__main .ec-productRole .ec-productRole__buyTab > li:last-child::after {
  display: none;
}

/* Product buy tab radio buttons */
.ec-productRole__buyTab__list__item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ec-productRole__buyTab__list__item label {
  outline: none;
  cursor: pointer;
}

.ec-productRole__buyTab__list__item label::before,
.ec-productRole__buyTab__list__item label::after {
  display: none;
}

/* ------------------------------------
 * Modal Close Button
 * ------------------------------------ */
.remodal button.front_page__modal__close {
  background-position: center;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.remodal button.front_page__modal__close:hover,
.remodal button.front_page__modal__close:active {
  background-color: rgba(0, 0, 0, 0.06);
  filter: brightness(1.06);
}

.remodal button.front_page__modal__close:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ------------------------------------
 * Utility Classes
 * ------------------------------------ */
/* Remove opacity on hover globally */
a:hover {
  opacity: 1;
}

/* Checkbox styling */
.ec-checkbox .form-check-input:checked[type="checkbox"] {
  --bs-form-check-bg-image: none;
}

/* Credit card delete button */
.ec-addressCard.-credit .credit-delete {
  position: absolute;
  right: 15px;
  cursor: pointer;
}

.ec-addressCard.-credit .credit-delete:hover {
  color: #dc3545;
}

/* Pet info header button alignment */
.pet-info-header .remove-pet-button {
  margin-left: auto;
}

/* ------------------------------------
 * Accessibility: Reduced Motion
 * ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .ec-blockBtn,
  .ec-inlineBtn,
  .modal-btn,
  .mypage-btn-min,
  .mypage-btn-min-outline,
  .ec-linkBtn,
  .remodal button.front_page__modal__close {
    transition: none;
    transform: none;
  }

  .ec-blockBtn--action.is-loading::after {
    animation: none;
  }
}