/* ================================================================
   Địa Điểm Pro — Review Widget CSS
   ================================================================ */

/* ── Widget wrapper ── */
.ddpr-widget { font-family: 'Be Vietnam Pro', sans-serif; }

/* ── Summary block ── */
.ddpr-summary {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ddpr-big-score {
    text-align: center;
    flex-shrink: 0;
}
.ddpr-big-num {
    font-size: 56px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    display: block;
}
.ddpr-big-max {
    font-size: 18px;
    color: #94a3b8;
}
.ddpr-big-stars {
    font-size: 20px;
    display: block;
    margin: 4px 0 6px;
}
.ddpr-big-stars .star-full  { color: #fbbf24; }
.ddpr-big-stars .star-half  { color: #fbbf24; opacity: .6; }
.ddpr-big-stars .star-empty { color: #e2e8f0; }
.ddpr-big-count {
    font-size: 12px;
    color: #64748b;
    display: block;
}
.ddpr-dist { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.ddpr-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}
.ddpr-dist-row > span:first-child { width: 20px; flex-shrink: 0; text-align: right; }
.ddpr-dist-row > span:last-child  { width: 20px; flex-shrink: 0; }
.ddpr-dist-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9px;
    overflow: hidden;
}
.ddpr-dist-bar div {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 9px;
    transition: width .4s ease;
}

/* ── Review card ── */
.ddpr-card {
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color .2s;
}
.ddpr-card:hover { border-color: #dbeafe; }
.ddpr-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ddpr-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.ddpr-meta { flex: 1; min-width: 0; }
.ddpr-name  { display: block; font-size: 14px; font-weight: 700; color: #0f172a; }
.ddpr-date  { font-size: 11px; color: #94a3b8; }
.ddpr-overall { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ddpr-stars { color: #fbbf24; font-size: 14px; }
.ddpr-score { font-size: 15px; font-weight: 800; color: #0f172a; }

/* Criteria row (compact) */
.ddpr-criteria-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ddpr-cr-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid #f1f5f9;
}
.ddpr-cr-label { color: #64748b; }
.ddpr-cr-bar {
    width: 40px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    display: block;
}
.ddpr-cr-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 3px;
}
.ddpr-cr-val { color: #0f172a; font-weight: 700; }

/* Review content */
.ddpr-content {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    margin: 0;
}

/* Empty state */
.ddpr-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

/* Load more button */
.ddpr-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    margin-top: 12px;
}
.ddpr-load-more:hover { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }

/* ── Form ── */
.ddpr-form-wrap {
    background: #fafafa;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-top: 24px;
}
.ddpr-form-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
    color: #0f172a;
}

/* Star picker */
.ddpr-star-picker { margin-bottom: 16px; }
.ddpr-star-picker label,
.ddpr-cr-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 5px;
}
.ddpr-stars-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}
.ddpr-star {
    font-size: 28px;
    color: #e2e8f0;
    transition: color .15s, transform .1s;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}
.ddpr-star.active, .ddpr-star:hover { color: #fbbf24; transform: scale(1.15); }
.ddpr-star-label {
    font-size: 13px;
    color: #94a3b8;
    margin-left: 8px;
}

/* Criteria input rows */
.ddpr-criteria-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    padding: 14px;
}
.ddpr-cr-input-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ddpr-cr-input-row .ddpr-stars-input .ddpr-star { font-size: 20px; }

/* Form fields */
.ddpr-form-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ddpr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .ddpr-form-row { grid-template-columns: 1fr; } }
.ddpr-field { display: flex; flex-direction: column; gap: 4px; }
.ddpr-field label { font-size: 13px; font-weight: 600; color: #374151; }
.ddpr-field input,
.ddpr-field textarea {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: border-color .2s;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.ddpr-field input:focus,
.ddpr-field textarea:focus { border-color: #7c3aed; }
.ddpr-field textarea { resize: vertical; }

.ddpr-submit-btn {
    padding: 13px 32px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s, transform .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}
.ddpr-submit-btn:hover { opacity: .9; transform: translateY(-1px); }
.ddpr-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Tabs (Giới Thiệu / Đánh Giá) ── */
.ddp-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 20px;
    overflow-x: auto;
}
.ddp-tab-btn {
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
    font-family: inherit;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.ddp-tab-btn:hover { color: #0f172a; }
.ddp-tab-btn.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}
.ddp-tab-count {
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    transition: all .18s;
}
.ddp-tab-btn.active .ddp-tab-count { background: #f3e8ff; color: #7c3aed; }
.ddp-tab-panel { display: none; }
.ddp-tab-panel.active { display: block; }

/* ── Phone reveal ── */
.ddp-phone-masked {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
    padding: 5px 12px;
    background: #eff6ff;
    border-radius: 7px;
    border: 1px solid #bfdbfe;
    transition: all .2s;
    user-select: none;
}
.ddp-phone-masked:hover { background: #dbeafe; }
.ddp-phone-masked .ddp-reveal-icon { font-size: 12px; opacity: .7; }
.ddp-phone-real {
    display: none;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    font-weight: 700;
    font-size: 14px;
}
.ddp-phone-real a { color: #16a34a; text-decoration: none; }
.ddp-phone-real a:hover { text-decoration: underline; }

/* ── Khu vực filter (archive guide) ── */
.ddpg-kv-section {
    margin-bottom: 20px;
}
.ddpg-kv-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ddpg-kv-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ddpg-kv-pill {
    padding: 4px 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
}
.ddpg-kv-pill:hover, .ddpg-kv-pill.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* ── Import review admin ── */
.ddp-review-import-wrap { max-width: 900px; }
.ddp-review-sample-table { font-size: 12px; overflow-x: auto; }
.ddp-review-sample-table table { min-width: 800px; }

/* ── Mobile ── */
@media (max-width: 640px) {
    .ddpr-summary { flex-direction: column; }
    .ddpr-criteria-inputs { grid-template-columns: 1fr 1fr; }
    .ddpr-form-wrap { padding: 16px; }
}

/* ── Messages ── */
.ddpr-msg-error {
    padding: 12px 16px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}
.ddpr-msg-success {
    padding: 12px 16px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}
