/* ===================================
   小田原ミシン 生地計算ツール
=================================== */

.oss-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

.oss-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.oss-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 700;
}

.oss-description {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.oss-field {
  margin-bottom: 20px;
}

.oss-field label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.oss-field input,
.oss-field select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.oss-field input:focus,
.oss-field select:focus {
  outline: none;
  border-color: #2b7cff;
}

.oss-guide {
  background: #f7f9fc;
  border-left: 4px solid #2b7cff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#oss-size-guide {
  margin-top: 8px;
  font-size: 18px;
  font-weight: bold;
}
/* ===========================
  ボタン
=========================== */

.oss-button {
  width: 100%;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s;
}

.oss-button:hover {
  background: #004f9e;
  transform: translateY(-2px);
}

.oss-button:active {
  transform: translateY(0);
}

/* ===========================
  ローディング
=========================== */

.oss-loading {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #0066cc;
  padding: 20px;
}

/* ===========================
  結果カード
=========================== */

.oss-result {
  margin-top: 30px;
}

.oss-result-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #e5e5e5;
}

.oss-result-card h2,
.oss-result-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

/* ===========================
   テーブル
=========================== */

.oss-table {
  width: 100%;
  border-collapse: collapse;
}

.oss-table th,
.oss-table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

.oss-table th {
  width: 45%;
  background: #f2f2f2;
  text-align: left;
}

/* ===========================
   エラー
=========================== */

.oss-error {
  margin-top: 20px;
  background: #ffecec;
  color: #b00020;
  border: 1px solid #ffb3b3;
  border-radius: 8px;
  padding: 15px;
  font-weight: bold;
}
/* ===========================
   裁断レイアウト
=========================== */

.oss-layout {
  margin-top: 30px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
}

.oss-layout h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
}

#oss-layout-canvas {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

/* ===========================
   区切り線
=========================== */

.oss-divider {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid #e5e5e5;
}

/* ===========================
   ヘルプ
=========================== */

.oss-help,
.oss-notice {
  margin-top: 30px;
}

.oss-help h3,
.oss-notice h3 {
  margin-bottom: 15px;
}

.oss-help-list,
.oss-notice ul {
  padding-left: 20px;
}

.oss-help li,
.oss-notice li {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* ===========================
   フッター
=========================== */

.oss-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* ===========================
   レスポンシブ
=========================== */

@media (max-width: 768px) {
  .oss-container {
    padding: 15px;
  }

  .oss-card {
    padding: 20px;
  }

  .oss-title {
    font-size: 24px;
  }

  .oss-description {
    font-size: 14px;
  }

  .oss-field input,
  .oss-field select {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    line-height: normal;

    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
  }
  .oss-button {
    font-size: 17px;
    padding: 14px;
  }

  .oss-table th,
  .oss-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .oss-table th {
    border-bottom: none;
  }

  .oss-table td {
    margin-bottom: 15px;
  }
}
/* プルダウンを強制的に正常表示 */
#oss-project {
  display: block;
  width: 100% !important;
  min-width: 300px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
}

.oss-field {
  width: 100%;
}

.oss-card {
  width: 100%;
  box-sizing: border-box;
}
.oss-field select {
  height: 48px !important;
}
/* ===========================
   印刷専用
=========================== */

@media print {
  body {
    background: #fff;
  }

  .oss-button,
  .oss-actions,
  .oss-shop-links,
  .oss-help,
  .oss-notice {
    display: none !important;
  }

  .oss-card {
    box-shadow: none;
    border: 1px solid #000;
  }

  .oss-result-card {
    border: 1px solid #000;
  }

  #oss-layout {
    display: block !important;
  }

  #oss-layout-canvas {
    max-width: 100%;
    border: 1px solid #000;
  }

  .oss-title {
    font-size: 24px;
  }
}
.oss-shop-links {
  margin-top: 30px;
}

.oss-buy-button {
  display: block;
  margin: 10px 0;
  padding: 14px;
  background: #0066cc;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: 0.2s;
}

.oss-buy-button:hover {
  background: #004d99;
}
.oss-actions {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.oss-actions .oss-button {
  flex: 1;
}
/* ===========================
   購入ボタン
=========================== */

.oss-buy-card {
  margin-top: 30px;
  padding: 25px;

  background: #f8fafc;

  border: 1px solid #dbe5ef;

  border-radius: 12px;

  text-align: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.oss-buy-card h3 {
  margin-bottom: 15px;

  color: #1f2937;

  font-size: 20px;
}

.oss-buy-card p {
  margin-bottom: 20px;

  color: #555;

  line-height: 1.6;
}

.oss-buy-button {
  display: inline-block;

  padding: 14px 32px;

  background: #2563eb;

  color: #fff;

  text-decoration: none;

  font-size: 16px;

  font-weight: bold;

  border-radius: 8px;

  transition: 0.25s;
}

.oss-buy-button:hover {
  background: #1d4ed8;

  transform: translateY(-2px);
}
/* ===========================
   計算日時
=========================== */

.oss-date {
  color: #666;

  margin-top: 8px;

  margin-bottom: 20px;

  font-size: 14px;
}

/* ===========================
   印刷ボタン
=========================== */

.oss-print {
  text-align: center;

  margin-top: 30px;
}

.oss-print-btn {
  background: #2563eb;

  color: #fff;

  border: none;

  padding: 14px 28px;

  border-radius: 8px;

  cursor: pointer;

  font-size: 16px;

  font-weight: bold;
}

.oss-print-btn:hover {
  background: #1d4ed8;
}
@media print {
  #oss-form {
    display: none;
  }

  #oss-calc {
    display: none;
  }

  .oss-print {
    display: none;
  }
}
.oss-date {
  margin: 8px 0 20px;
  color: #666;
  font-size: 14px;
}
/* ===========================
   購入ボタン
=========================== */

.oss-buy-card {
  margin-top: 30px;
  padding: 25px;

  background: #f8fafc;

  border: 1px solid #dbe5ef;

  border-radius: 12px;

  text-align: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.oss-buy-card h3 {
  margin-bottom: 15px;

  color: #1f2937;

  font-size: 20px;
}

.oss-buy-card p {
  margin-bottom: 20px;

  color: #555;

  line-height: 1.6;
}

.oss-buy-button {
  display: inline-block;

  padding: 14px 32px;

  background: #2563eb;

  color: #fff;

  text-decoration: none;

  font-size: 16px;

  font-weight: bold;

  border-radius: 8px;

  transition: 0.25s;
}

.oss-buy-button:hover {
  background: #1d4ed8;

  transform: translateY(-2px);
}
.oss-pdf-btn {
  margin-left: 15px;

  background: #16a34a;

  color: #fff;

  border: none;

  padding: 14px 28px;

  border-radius: 8px;

  cursor: pointer;

  font-size: 16px;

  font-weight: bold;
}

.oss-pdf-btn:hover {
  background: #15803d;
}
.oss-material-card {
  margin-top: 30px;

  padding: 20px;

  background: #fafafa;

  border-radius: 12px;

  border: 1px solid #ddd;
}

.oss-material-item {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 12px 0;

  border-bottom: 1px solid #eee;
}

.oss-material-item p {
  margin: 0;

  font-weight: bold;
}

.oss-buy-button {
  background: #2563eb;

  color: white;

  padding: 10px 18px;

  border-radius: 6px;

  text-decoration: none;
}
/* ==========================
   必要材料・購入
========================== */

.oss-materials {
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fb;
  border-radius: 12px;
  border: 1px solid #e2e5e9;
}

.oss-materials h3 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
}

.oss-material-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oss-material-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
}

.oss-material-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.oss-material-info strong {
  font-size: 16px;
}

.oss-material-info span {
  font-size: 14px;
  color: #666;
}

.oss-buy-button {
  display: inline-block;
  padding: 10px 18px;
  background: #1e73be;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.oss-buy-button:hover {
  opacity: 0.85;
}

/* スマホ */
@media (max-width: 600px) {
  .oss-material-item {
    flex-direction: column;
    align-items: stretch;
  }

  .oss-buy-button {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }
}
/* ミシン販売プロモーションカード */
.oss-promo-card {
  margin: 25px 0;
  padding: 20px;
  background: #f4f8fa;
  border: 2px solid #2b7a78;
  border-radius: 8px;
}

.oss-promo-header h3 {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  color: #17252a;
}

.oss-promo-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.oss-promo-list {
  margin: 15px 0;
  padding-left: 0;
  list-style: none;
}

.oss-promo-list li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.oss-promo-action {
  text-align: center;
  margin-top: 15px;
}

.oss-promo-btn {
  display: inline-block;
  background-color: #2b7a78;
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.oss-promo-btn:hover {
  background-color: #3aafa9;
}

/* PDF・印刷用 特典チケット */
.oss-coupon-box {
  margin: 20px 0;
  padding: 15px;
  border: 2px dashed #e63946;
  background-color: #fff5f5;
  border-radius: 6px;
  text-align: center;
}

.oss-coupon-badge {
  display: inline-block;
  background-color: #e63946;
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 5px;
}

.oss-coupon-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: #111;
  margin-bottom: 5px;
}

.oss-coupon-desc {
  font-size: 0.85rem;
  color: #444;
  margin: 0;
}
/* ==========================================
   スマホ表示（レスポンシブ）修正
   ========================================== */
@media (max-width: 600px) {
  /* ボタンエリアを縦並びに変更 */
  .oss-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .oss-actions .oss-button {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* キャンバスがスマホ枠からはみ出るのを防止 */
  canvas#oss-canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* カード枠の余白調整 */
  .oss-result-card,
  #oss-pdf {
    width: 100% !important;
    box-sizing: border-box;
    padding: 15px !important;
  }
}
