/* ds-common.css – Consolidated shared styles for Grabge */

/* ===================== */
/* 0) Theme Variables    */
/* ===================== */
:root{
  --card-border:#e6eef7;

  /* 淡色卡片背景 */
  --t-yellow:#fffdf6; /* delivery */
  --t-green:#f7fdf8;  /* trash */

  /* 預設按鈕 */
  --btn: #87CEEB;
  --btn-hover:#5dbde4;
}

/* 1️⃣ Generic flexible option container (combines .ds-category-boxes & .ds-choice) */
.ds-flex-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    /* flex-wrap: wrap;  ⇠ uncomment if you need wrapping on narrow screens */
}

/* 2️⃣ Re-usable card / box component (combines .ds-category-box & .ds-card) */
.ds-card {
    width: 190px;              /* override per-component if needed */
    padding: 22px;
    border-radius: 12px;
    background: #FFFFF0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border:1px solid var(--card-border);
}

/* Variant backgrounds for category cards */
.ds-card.is-delivery{ background: var(--t-yellow); }
.ds-card.is-trash{ background: var(--t-green); }

/* Default hover-state */
.ds-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ds-card-desc {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin: 10px 0 20px;
}

/* 2-a️⃣ Variant: Category box (keeps original hover scale)  */
.ds-category-box {
    width: 180px;   /* original width */
    padding: 20px;  /* original padding */
}
.ds-category-box:hover {
    transform: scale(1.05);
    /* keeps background consistent */
}

/* 3️⃣ Icon wrapper (deduplicates duplicate .ds-icon rules) */
.ds-icon {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 48px; /* for emoji */
}
.ds-icon img {
    height: 48px;
    width: 48px;
}

/* 4️⃣ Collapsible / toggled visibility sections & forms */
.ds-hide { display: none; }
.ds-show { display: block; }

/* 5️⃣ Record card (from match-history) – left as-is but moved here for completeness */
.ds-record {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    background: #f0f8ff;
}
.ds-record small { color: #666; }

/* 6️⃣ Form elements (from request-form) */
.ds-form {
    max-width: 500px;
    margin: auto;
}

/* 大卡片外框（包住整個表單用） */
.ds-card-min{
  border-radius:12px;
  padding:16px;
  margin:12px 0;
  border:1px solid var(--card-border);
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  background:#fff; /* default */
}
/* 依類型切換背景色 */
.ds-card-min.is-delivery{ background: var(--t-yellow); }
.ds-card-min.is-trash{ background: var(--t-green); }

/* checkbox 行內排版 + 右對齊（避免手機被推到畫面外） */
.ds-add-trash{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
  white-space:nowrap;
}

.ds-form input,
.ds-form textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* 按鈕支援主題變數（預設藍） */
.ds-form button {
    background: var(--btn);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.ds-form button:hover {
    background: var(--btn-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.ds-form h3 {
    text-align: center;
    color: #333;
}

/* 在不同卡片上覆寫按鈕主題色（和卡片背景呼應） */
.ds-card-min.is-delivery{
  --btn:#f59e0b;        /* 橘 */
  --btn-hover:#d97706;
}
.ds-card-min.is-trash{
  --btn:#16a34a;        /* 綠 */
  --btn-hover:#15803d;
}

/* 7️⃣ Success alert */
.ds-success {
    text-align: center;
    background: #e1ffe1;
    border-left: 4px solid #33aa33;
    padding: 10px 16px;
    margin: 20px auto;
    max-width: 500px;
    border-radius: 6px;
    font-weight: bold;
}

/* (from service-form) */
.ds-row {
    display: flex;
    align-items: center;
    margin-bottom: 1em;
    gap: 1em;
}
.ds-row label {
    min-width: 120px;
    font-weight: bold;
}

.ds-service-intro {
  margin-top: 60px;
  text-align: center;
}
.ds-section-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #333;
}

/* 小尺寸裝置微調，避免被浮動按鈕或邊緣遮住 */
@media (max-width: 480px){
  .ds-add-trash{ padding-right: 8px; }
}

/* 🔗 HOW TO USE
   ‣ Replace
       <div class="ds-category-boxes"> → <div class="ds-flex-options">
       <div class="ds-choice">        → <div class="ds-flex-options">
   ‣ 給卡片加上類型：
       <div class="ds-card ds-category-box is-delivery">…</div>
       <div class="ds-card ds-category-box is-trash">…</div>
   ‣ 表單外層大卡片：
       <div class="ds-card-min is-delivery">…form…</div>
       <div class="ds-card-min is-trash">…form…</div>
   ‣ 按鈕顏色會自動跟著卡片主題色（由 --btn / --btn-hover 控制）
*/
