/* ============================================================
   DreamSetu+ Frontend Styles
   ============================================================ */

.dreamsetu-wrap {
    --ds-primary:     #8b4513;
    --ds-primary-hover: #6d370f;
    --ds-positive:    #2d6a4f;
    --ds-negative:    #c62828;
    --ds-mixed:       #e65100;
    --ds-bg:          #fdf8f3;
    --ds-card-bg:     #ffffff;
    --ds-border:      #e8ddd3;
    --ds-text:        #2c1810;
    --ds-text-muted:  #7a6155;
    --ds-gold:        #c9963a;
    --ds-radius:      12px;
    --ds-shadow:      0 2px 16px rgba(139,69,19,0.10);

    font-family: 'Inter', sans-serif;
    color: var(--ds-text);
    background: var(--ds-bg);
    border-radius: 16px;
    padding: 0 0 32px;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.dreamsetu-wrap *, .dreamsetu-wrap *::before, .dreamsetu-wrap *::after {
    box-sizing: border-box;
}

/* ── Header ── */
.ds-header {
    background: linear-gradient(135deg, #3d1a0a 0%, #6b2d0f 50%, #8b4513 100%);
    border-radius: 16px 16px 0 0;
    padding: 28px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.ds-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.ds-header-inner { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.ds-header-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #ffd580; flex-shrink: 0;
}
.ds-title { font-family: 'Merriweather', serif; font-size: 1.9em; color: #fff; margin: 0 0 4px; font-weight: 700; }
.ds-subtitle { color: rgba(255,255,255,0.75); margin: 0; font-size: 0.95em; }

/* ── Two-column grid ── */
.ds-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding: 0 24px;
    align-items: start;
}

/* ── Cards ── */
.ds-card {
    background: var(--ds-card-bg);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    padding: 24px;
    box-shadow: var(--ds-shadow);
}
.ds-card-title {
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    color: var(--ds-primary);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Search ── */
.ds-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
#ds-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--ds-border);
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    color: var(--ds-text);
    background: var(--ds-bg);
    transition: border-color 0.2s;
    outline: none;
}
#ds-search-input:focus { border-color: var(--ds-primary); }
#ds-search-input::placeholder { color: var(--ds-text-muted); }

/* ── Chips ── */
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ds-chips-label { font-size: 0.8em; color: var(--ds-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.ds-chip {
    background: #fef3e8;
    border: 1px solid #f0d5b0;
    color: var(--ds-primary);
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s;
    font-weight: 500;
}
.ds-chip:hover { background: var(--ds-primary); color: #fff; border-color: var(--ds-primary); }

/* ── Buttons ── */
.ds-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.ds-btn-primary {
    background: var(--ds-primary);
    color: #fff;
    border-color: var(--ds-primary);
}
.ds-btn-primary:hover {
    background: var(--ds-primary-hover);
    border-color: var(--ds-primary-hover);
    color: #fff;
    text-decoration: none;
}
.ds-btn-secondary {
    background: #fff;
    color: var(--ds-primary);
    border-color: var(--ds-primary);
}
.ds-btn-secondary:hover { background: #fef3e8; }
.ds-btn-outline {
    background: transparent;
    color: var(--ds-primary);
    border-color: var(--ds-border);
}
.ds-btn-outline:hover { background: #fef3e8; border-color: var(--ds-primary); color: var(--ds-primary); text-decoration: none; }

/* ── Result card ── */
.ds-result-area { margin-top: 20px; }
.ds-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}
.ds-result-eyebrow {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ds-text-muted);
    margin-bottom: 4px;
}
.ds-result-term {
    font-family: 'Merriweather', serif;
    font-size: 1.4em;
    margin: 0;
    color: var(--ds-text);
}
.ds-result-meaning {
    font-size: 0.97em;
    line-height: 1.7;
    color: #3d2217;
    margin-bottom: 20px;
}

/* ── Badge ── */
.ds-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ds-badge-positive { background: #e8f5ee; color: var(--ds-positive); border: 1px solid #b7d9c8; }
.ds-badge-negative { background: #fdeaea; color: var(--ds-negative); border: 1px solid #f5b8b8; }
.ds-badge-mixed    { background: #fff3e0; color: var(--ds-mixed);    border: 1px solid #ffd199; }

/* ── Remedy box ── */
.ds-remedy-box {
    background: linear-gradient(135deg, #fef9f0 0%, #fef3e2 100%);
    border: 1px solid #f0d5a8;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.ds-remedy-title {
    font-weight: 700;
    font-size: 0.88em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ds-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.ds-remedy-text {
    font-size: 0.93em;
    line-height: 1.65;
    color: #5c3318;
}
.ds-remedy-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e0c090;
    font-size: 0.85em;
    color: var(--ds-primary);
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-style: italic;
}

/* ── Result actions ── */
.ds-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

/* ── Feedback ── */
.ds-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--ds-border);
    font-size: 0.85em;
    color: var(--ds-text-muted);
    flex-wrap: wrap;
}
.ds-feedback-btn {
    background: #f5f0eb;
    border: 1px solid var(--ds-border);
    border-radius: 6px;
    padding: 5px 13px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.15s;
}
.ds-feedback-btn:hover, .ds-feedback-btn.ds-feedback-active {
    background: var(--ds-primary);
    color: #fff;
    border-color: var(--ds-primary);
}

/* ── Temple card ── */
.ds-temple-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.ds-temple-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #fef3e8, #fde8cc);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--ds-primary); flex-shrink: 0;
}
.ds-temple-eyebrow {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ds-text-muted);
    margin-bottom: 3px;
}
.ds-temple-name {
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    margin: 0;
    color: var(--ds-primary);
    line-height: 1.3;
}
.ds-temple-desc {
    font-size: 0.88em;
    line-height: 1.65;
    color: var(--ds-text-muted);
    margin-bottom: 16px;
}

/* ── Offerings list ── */
.ds-offerings {
    list-style: none;
    padding: 0; margin: 0 0 20px;
}
.ds-offerings li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5ebe0;
    font-size: 0.88em;
    color: var(--ds-text);
    line-height: 1.5;
}
.ds-offerings li:last-child { border-bottom: none; }
.ds-offering-icon {
    width: 28px; height: 28px;
    background: #fef3e8;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ds-primary);
    font-size: 12px;
    flex-shrink: 0;
}
.ds-temple-actions { display: flex; flex-direction: column; gap: 10px; }
.ds-temple-actions .ds-btn { justify-content: center; width: 100%; }

/* ── Testimonial ── */
.ds-testimonial-card { margin-top: 16px; }
.ds-testimonial-stars { font-size: 1em; margin-bottom: 10px; letter-spacing: 2px; }
.ds-testimonial-text {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 0.92em;
    line-height: 1.7;
    color: #4a2c1a;
    margin: 0 0 10px;
    padding-left: 0;
    border-left: none;
}
.ds-testimonial-author { font-size: 0.82em; color: var(--ds-text-muted); font-weight: 600; }

/* ── Loading ── */
.ds-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--ds-text-muted);
}
.ds-spinner {
    width: 40px; height: 40px;
    border: 3px solid #f0d5a8;
    border-top-color: var(--ds-primary);
    border-radius: 50%;
    animation: ds-spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 850px) {
    .ds-grid { grid-template-columns: 1fr; }
    .ds-header { padding: 20px; }
    .ds-grid { padding: 0 12px; }
    .ds-title { font-size: 1.5em; }
}
@media (max-width: 500px) {
    .ds-search-box { flex-direction: column; }
    .ds-result-header { flex-direction: column; align-items: flex-start; }
    .ds-result-actions { flex-direction: column; }
    .ds-result-actions .ds-btn { justify-content: center; }
    .dreamsetu-wrap { padding-bottom: 16px; }
}
