/* =============================================================
   DRR – Dynamic Review & Rating System  |  drr-style.css
   ============================================================= */

/* ---- Stars Display (read-only) ---- */
.drr-stars-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.drr-stars-display {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

.drr-star {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
}
.drr-star--full  { color: #f5a623; }
.drr-star--half  { color: #f5a623; opacity: 0.6; }
.drr-star--empty { color: #ddd; }

.drr-stars-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    font-size: 13px;
    color: #888;
}
.drr-rating-value { font-weight: 600; color: #555; }

.drr-review-count-text {
    font-size: 13px;
    color: #888;
    margin-left: 2px;
}

/* ---- Summary Block ---- */
.drr-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}
.drr-summary__score {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}
.drr-summary__total {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ---- Notices ---- */
.drr-notice {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
}
.drr-notice--info    { background: #e8f4fd; border-left: 4px solid #3498db; color: #1a5276; }
.drr-notice--warning { background: #fef9e7; border-left: 4px solid #f39c12; color: #7d6608; }
.drr-notice--success { background: #eafaf1; border-left: 4px solid #27ae60; color: #1e8449; }

/* ---- Review Form ---- */
.drr-review-form-wrap {
    margin: 16px 0;
}

.drr-review-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.drr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drr-label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Interactive Star Picker ---- */
.drr-star-picker {
    display: flex;
    flex-direction: row;   /* normal 1–5 left-to-right order */
    gap: 2px;
}

.drr-star-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.drr-star-picker label {
    font-size: 28px;
    color: #ddd;           /* default: unlit */
    cursor: pointer;
    transition: color 0.12s, transform 0.1s;
    line-height: 1;
    padding: 0 2px;
    user-select: none;
}

/* JS-driven classes only — no CSS sibling tricks */
.drr-star-picker label.drr-star-active   { color: #f5a623; transform: scale(1.1); }
.drr-star-picker label.drr-star-inactive { color: #ddd;    transform: scale(1);   }

/* ---- Textarea ---- */
.drr-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}
.drr-textarea:focus {
    outline: none;
    border-color: #f5a623;
    box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

/* ---- Submit Button ---- */
.drr-btn--submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #f5a623;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    align-self: flex-start;
}
.drr-btn--submit:hover   { background: #d4891a; }
.drr-btn--submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- Form Messages ---- */
.drr-form-message {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    min-height: 0;
    transition: all 0.2s;
}
.drr-form-message:empty { display: none; }
.drr-msg--success { background: #eafaf1; color: #1e8449; border-left: 3px solid #27ae60; }
.drr-msg--error   { background: #fdf2f2; color: #922b21; border-left: 3px solid #e74c3c; }

/* ---- Review List ---- */
.drr-review-list-wrap {
    margin: 16px 0;
}

.drr-no-reviews {
    color: #888;
    font-style: italic;
    font-size: 14px;
}

.drr-reviews {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drr-review {
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

.drr-review__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.drr-review__avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.drr-review__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.drr-review__author {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.drr-review__date {
    font-size: 12px;
    color: #aaa;
}

.drr-review__stars {
    margin-left: auto;
}
.drr-review__stars .drr-star { font-size: 15px; }

.drr-review__body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-top: 6px;
}

/* ---- Pagination ---- */
.drr-pagination {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.drr-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.15s;
}
.drr-page-btn:hover       { border-color: #f5a623; color: #f5a623; }
.drr-page-btn--active     { background: #f5a623; border-color: #f5a623; color: #fff; font-weight: 600; }

/* ---- Inline form title ---- */
.drr-inline-form {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.drr-inline-form__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
}
