/* ================================================
   Daraz-Style Reviews — reviews.css
   ================================================ */

.dr-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 540px;
    margin: 0 auto;
    color: #333;
}

/* ── Summary Bar ── */
.dr-summary {
    background: #fff8f4;
    border: 1px solid #f5c89a;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.dr-summary-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}
.dr-big-score {
    font-size: 42px;
    font-weight: 700;
    color: #f57224;
    line-height: 1;
}
.dr-sum-stars {
    color: #f5a623;
    font-size: 20px;
    letter-spacing: 2px;
}
.dr-sum-label {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ── Success Banner ── */
.dr-success {
    background: #eaf3de;
    border: 1px solid #639922;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #3B6D11;
    margin-bottom: 16px;
}

/* ── Form Box ── */
.dr-form-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dr-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #f57224;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.dr-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 7px;
}
.dr-req    { color: #e24b4a; }
.dr-optional { font-weight: 400; color: #aaa; }

/* ── Stars ── */
.dr-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
}
.dr-star {
    font-size: 38px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.12s, transform 0.1s;
    line-height: 1;
    user-select: none;
}
.dr-star:hover,
.dr-star.dr-hover { color: #f5a623; }
.dr-star.dr-active { color: #f5a623; }
.dr-star:hover     { transform: scale(1.15); }

.dr-star-label {
    font-size: 13px;
    color: #888;
    min-height: 18px;
    margin-bottom: 2px;
}

/* ── Inputs ── */
.dr-input,
.dr-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.dr-input:focus,
.dr-textarea:focus {
    border-color: #f57224;
    background: #fff;
}
.dr-textarea {
    resize: vertical;
    min-height: 95px;
}
.dr-char-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.dr-char-count {
    font-size: 11px;
    color: #aaa;
}

/* ── Tags ── */
.dr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dr-tag {
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    background: #fff;
    transition: all 0.15s;
    user-select: none;
}
.dr-tag:hover           { border-color: #f57224; color: #f57224; }
.dr-tag.dr-tag-selected { border-color: #f57224; color: #f57224; background: #fff7f2; }

/* ── Photo Upload ── */
.dr-photo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.dr-photo-add {
    width: 74px;
    height: 74px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #aaa;
    background: #fafafa;
    transition: border-color 0.2s, color 0.2s;
}
.dr-photo-add:hover { border-color: #f57224; color: #f57224; }
.dr-plus-icon { font-size: 26px; line-height: 1; }
.dr-plus-text { font-size: 11px; margin-top: 2px; }

.dr-photo-thumb {
    width: 74px;
    height: 74px;
    border-radius: 8px;
    position: relative;
    border: 1px solid #eee;
    overflow: hidden;
}
.dr-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dr-photo-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    line-height: 1;
    z-index: 2;
    border: none;
}
.dr-photo-remove:hover { background: rgba(200,0,0,0.8); }

/* ── Submit Button ── */
.dr-submit-btn {
    width: 100%;
    background: #f57224;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 4px;
    font-family: inherit;
}
.dr-submit-btn:hover   { background: #e06010; }
.dr-submit-btn:active  { transform: scale(0.98); }
.dr-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── Errors ── */
.dr-error {
    font-size: 12px;
    color: #e24b4a;
    margin-top: 4px;
    display: none;
}
.dr-error.dr-show { display: block; }

/* ── Spacer ── */
.dr-spacer { height: 16px; }

/* ── Reviews Section ── */
.dr-reviews-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.dr-reviews-heading {
    color: #333;
}

/* ── Review Card ── */
.dr-review-card {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fafafa;
}
.dr-review-card:last-child { margin-bottom: 0; }

.dr-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.dr-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f57224;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.dr-reviewer-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.dr-review-stars {
    color: #f5a623;
    font-size: 15px;
    letter-spacing: 1px;
}
.dr-review-text {
    font-size: 14px;
    color: #444;
    line-height: 1.65;
    margin-bottom: 10px;
    word-break: break-word;
}
.dr-review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.dr-review-tag {
    background: #fff7f2;
    border: 1px solid #f5c89a;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    color: #c05e10;
}
.dr-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.dr-review-photo {
    width: 62px;
    height: 62px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #eee;
    cursor: pointer;
}
.dr-review-date {
    font-size: 11px;
    color: #aaa;
}

/* ── Loading spinner ── */
.dr-loading {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .dr-form-box,
    .dr-reviews-section { padding: 16px; }
    .dr-star { font-size: 32px; }
    .dr-big-score { font-size: 34px; }
}
