/**
Theme Name: A&S Pro (OptiB Child)
Author: With-Planning
Author URI: https://with-planning.co.jp/
Description: OptiBの子テーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: optib-child
Template: optib
*/

/* 会員プラン商品ページでWooCommerceメッセージの余白消し（プラン切替時） */
body.postid-1849 .woocommerce-notices-wrapper {
  padding: 60px 60px 0;
}

body.postid-1849 .woocommerce-notices-wrapper:empty {
  display: none;
}

body.postid-1849 .woocommerce-info {
  margin-bottom: 0;
}

/* カスタムカート追加ボタンのスタイル */
.button.custom_add_to_cart_button {
  width: 100%;
  max-width: 320px;
  margin-inline: auto !important;
  text-align: center;
  line-height: 1 !important;
  padding: 1em !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  border-width: 2px !important;
  border-style: solid !important;
  border-bottom-width: 6px !important;
}
.button.custom_add_to_cart_button.disabled {
    background-color: #e7e7e7 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    border-color: #ccc !important;
    pointer-events: none !important;
    user-select: none !important;
}

.button.custom_add_to_cart_button:not(.disabled) {
  /*background: #E50180;*/
  /*color: #fff;*/
}

.button.custom_add_to_cart_button i {
  height: 1px;
  width: 100%;
  background: #ccc;
}

/*.button.add_to_cart_button.disabled:hover {*/
/*    background-color: #ccc !important;*/
/*    color: #666 !important;*/
/*    border-color: #ccc !important;*/
/*}*/

/* 価格・商品タイプ表示用のスタイル */
.custom-add-to-cart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.custom_add_to_cart_price {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.custom_add_to_cart_price small {
  font-size: 0.95rem;
  margin-left: .3em;
}

.custom_add_to_cart_type {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.custom-add-to-cart-wrapper .button {
    margin-top: 5px;
}

.cart_button_label {
  font-weight: 700;
}

/* 通常商品（買い切り）のボタン */
.button.custom_add_to_cart_button.one-time-purchase {
  background-color: #f8f9fa;
  border-color: #3498db;
}

.button.custom_add_to_cart_button.one-time-purchase:not(.disabled) .cart_button_label {
  color: #3498db;
}

.button.custom_add_to_cart_button.one-time-purchase:hover:not(.disabled) {
  background-color: #e7f1ff;
  border-color: #2980b9;
}

/* 年間サブスクリプション商品のボタン */
.button.custom_add_to_cart_button.monthly-subscription {
  /*background-color: #ffeaea;*/
  /*border-color: #e74c3c;*/
  background-color: #f8f9fa;
  border-color: #3498db;
}

.button.custom_add_to_cart_button.monthly-subscription:not(.disabled) .cart_button_label {
  /*color: #e74c3c;*/
  color: #3498db;
}
.button.custom_add_to_cart_button.monthly-subscription:hover:not(.disabled) {
  /*background-color: #ffcccc;*/
  /*border-color: #c0392b;*/
  background-color: #e7f1ff;
  border-color: #2980b9;
}

/* 月間サブスクリプション商品のボタン */
.button.custom_add_to_cart_button.yearly-subscription {
  background-color: #e8f5e8;
  border-color: #27ae60;
}

.button.custom_add_to_cart_button.yearly-subscription:not(.disabled) .cart_button_label {
  color: #27ae60;
}

.button.custom_add_to_cart_button.yearly-subscription:hover:not(.disabled) {
  background-color: #d4f0d4;
  border-color: #1e8449;
}

.custom_add_to_cart_add_text {
  background: #27ae60;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  margin-top: 10px;
  display: block;
  text-align: center;
  font-weight: 600;
  margin-inline: auto;
  width: fit-content;
}

.button.custom_add_to_cart_button.disabled .custom_add_to_cart_add_text {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}

.tutor-single-course-sidebar .tutor-single-course-sidebar-more {
  display: none;
}

.tutor-wrap {
  margin-block: 80px;
}

@media (max-width: 768px) {
  .tutor-wrap {
    margin-block: 40px;
  }
}

/* コース一覧でのアバターや作者名を非表示 */
.tutor-card-body .tutor-meta.tutor-mt-auto {
  display: none;
}

/* TutorLMS コースボタンカスタマイズ */

/* コースループの制限ボタン */
.tutor-course-restricted-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-direction: column;
}

.tutor-course-restricted-buttons .tutor-btn-sm {
  flex: 1;
  font-size: 12px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.tutor-course-restricted-buttons .tutor-btn-outline-primary {
  background-color: transparent;
  border: 1px solid #007cba;
  color: #007cba;
  text-align: center;
  justify-content: center;
}

.tutor-course-restricted-buttons .tutor-btn-outline-primary:hover {
  background-color: #007cba;
  color: white;
}

.tutor-course-restricted-buttons .tutor-btn-primary {
  background-color: #ff6b6b;
  border: 1px solid #ff6b6b;
  color: white;
  justify-content: center;
}

.tutor-course-restricted-buttons .tutor-btn-primary:hover {
  background-color: #ff5252;
  border-color: #ff5252;
}

/* メンバーシップ必要セクション */
.tutor-membership-required-section {
  padding: 20px 0;
}

.tutor-membership-required-section .tutor-alert {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.tutor-membership-required-section .tutor-alert-text {
  display: flex;
  align-items: center;
  color: #856404;
  font-size: 14px;
}

.tutor-membership-required-section .tutor-alert-icon {
  margin-right: 12px;
  font-size: 16px;
}

.tutor-membership-required-section .tutor-btn-primary {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 4px;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: all 0.3s ease;
}

.tutor-membership-required-section .tutor-btn-primary:hover {
  background-color: #ff5252;
  border-color: #ff5252;
  color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .tutor-course-restricted-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .tutor-course-restricted-buttons .tutor-btn-sm {
    flex: none;
    width: 100%;
  }
}

/* ヘッダープラン表示部分の崩れ修正 */
@media (max-width: 599px) {
  .wew-woo-welcome-top {
    flex-direction: column;
    align-items: center !important;
  }

  .wew-woo-welcome-text:not(:first-child)::before {
    content: none !important;
  }

  .wew-woo-welcome-text:nth-child(2) {
    margin-right: 0;
  }
}

.wew-woo-welcome-text:nth-child(2) {
  max-width: 330px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
