/* =============================================================================
   DZ Custom Comments — Plugin Styles
   RTL · Star Ratings · Hello Elementor Compatible
   ============================================================================= */

/* ── Reset / Base ─────────────────────────────────────────────────────────── */
.dzc-comments-area *,
.dzc-comments-area *::before,
.dzc-comments-area *::after {
    box-sizing: border-box;
}

#comments .children {
    padding-right: 40px !important;
    padding-top: 18px !important;
    background-image: url(/wp-content/plugins/dz-comments-plugin/assets/reply-review.svg);
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) 0;
}

.dzc-comments-area {
    direction: rtl;
    font-family: var(--dzc-font);
    color: var(--dzc-text);
}

/* ── Section Title ────────────────────────────────────────────────────────── */
.dzc-comments-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #C9A84C;
    text-align: right;
    margin: 0 0 24px;
    padding: 0;
    border: none;
}

/* ── No-comments placeholder ──────────────────────────────────────────────── */
.dzc-no-comments {
    background: #F9F9F9;
    border: none;
    border-radius: 16px;
    padding: 80px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dzc-no-comments__content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dzc-no-comments__icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    box-shadow: -12px 12px 32px 0px #6363631A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B8258;
}

.dzc-no-comments__title {
    font-size: 1rem;
    font-weight: 700;
    color: #0B8258;
    margin: 0 0 8px;
}

.dzc-no-comments__sub {
    font-size: .85rem;
    color: #999;
    margin: 0;
}

/* ── Comment List ────────────────────────────────────────────────────────── */
.dzc-comment-list,
.dzc-comment-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dzc-comment-item {
    margin-bottom: 18px;
}

/* ── Comment Card ────────────────────────────────────────────────────────── */
.dzc-comment-card {
    display: flex;
    gap: 24px;
    align-items: stretch;
    transition: box-shadow .2s ease;
    border: none;
    padding: 0;
    background: transparent;
}

.dzc-comment-card__content-col {
    flex: 1;
    background: #fff;
    border: 1px solid #EFEFEF;
    border-radius: 16px;
    padding: 32px;
}

.dzc-comment-card__meta-col {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #EFEFEF;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.dzc-comment-card--pending {
    opacity: .75;
}

.dzc-comment-pending {
    font-size: .77rem;
    color: #e07b1a;
    margin: 0 0 12px;
    padding: 6px 12px;
    background: #fff8ee;
    border-radius: 6px;
    border: 1px solid #fde3b6;
}

.dzc-comment-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0B8258;
    margin: 0 0 16px;
    text-align: right;
}

.dzc-comment-card__body {
    font-size: 14px;
    color: #56585B;
    line-height: 36px;
    text-align: justify;
    margin-bottom: 0;
}

.dzc-comment-card__body p {
    margin: 0;
}

/* ── Card Meta Column ────────────────────────────────────────────────────── */
.dzc-comment-card__meta-col-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.dzc-comment__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
}

.dzc-comment__avatar svg,
.dzc-comment__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.dzc-comment-card__author {
    font-size: 1rem;
    font-weight: 700;
    color: #0B8258;
    margin-bottom: 8px;
}

.dzc-comment-card__date {
    font-size: 14px;
    line-height: 20px;
    color: #A5A5A5;
    margin-bottom: 12px;
}

.dzc-comment-card__rating {
    margin-bottom: 16px;
}

.dzc-comment-card__meta-col-bottom {
    width: 100%;
}

/* Nested replies */
.dzc-comment-item .children {
    padding-right: 36px;
    margin-top: 14px;
    list-style: none;
}

/* ── Stars (display) ─────────────────────────────────────────────────────── */
.dzc-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    direction: ltr;
}

.dzc-star {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* SVG star size — change width/height here to resize all stars */
.dzc-star-svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.dzc-star--filled {
    color: #FFC107;
}

.dzc-star--empty {
    color: #DBDBDB;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.dzc-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    cursor: pointer !important;
    border: none;
    outline: none;
    border-radius: 50px !important;
    transition: all ease 0.3s !important;
    text-decoration: none;
    font-size: 16px !important;
    line-height: 24px !important;
    font-weight: bold !important;
}

.dzc-btn--primary {
    background: #0B8258 !important;
    color: #fff !important;
    padding: 16px 24px !important;
}

.dzc-btn--primary:hover {
    background: #086A46 !important;
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

.dzc-btn--primary svg path {
    transition: all ease 0.3s;
}

.dzc-btn--primary:focus svg path,
.dzc-btn--primary:hover svg path {
    stroke: #0B8258;
}

.dzc-btn--reply {
    background: #0B8258;
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
}

.dzc-btn--reply:hover {
    background: #086A46;
}

/* WP wraps reply link in <a> inside our span */
.dzc-btn--reply .comment-reply-link {
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 14px;
}

/* ── Comment Form ────────────────────────────────────────────────────────── */
.dzc-comment-form {
    background: #fff;
    border: 1px solid #EFEFEF;
    border-radius: 16px;
    padding: 40px;
    margin-top: 32px;
}

.dzc-field-wrap {
    margin-bottom: 32px;
    padding: 0;
}

.comment-form-email {
    display: none !important;
}

.dzc-field-wrap input[type="text"],
.dzc-field-wrap input[type="email"],
.dzc-field-wrap textarea {
    width: 100%;
    border: 1px solid #EFEFEF !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-family: inherit;
    font-size: 14px !important;
	line-height: 36px !important;
    color: #56585B !important;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    direction: rtl;
    resize: vertical;
    background: #fff !important;
}

.dzc-field-wrap input:focus,
.dzc-field-wrap textarea:focus {
    border-color: #0B8258;
}

.dzc-field-wrap input::placeholder,
.dzc-field-wrap textarea::placeholder {
    color: #B7B7B7;
}

.dzc-field-wrap textarea {
    min-height: 180px;
}

/* ── Form Footer ─────────────────────────────────────────────────────────── */
.dzc-form-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    justify-content: space-between;
}

#cancel-comment-reply-link {
    font-size: .8rem;
    color: #999;
    text-decoration: none;
    transition: color .2s;
}

#cancel-comment-reply-link:hover {
    color: #444;
}

/* ── Rating Form Field ───────────────────────────────────────────────────── */
.dzc-rating-wrap {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.dzc-rating-label {
    font-size: .83rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 12px;
    text-align: right;
}

.dzc-rating-options {
    display: flex;

    /* 5=عالی on the right */
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dzc-rating-option {
    cursor: pointer;
    user-select: none;
}

.dzc-rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.dzc-rating-option span {
    display: inline-block;
    padding: 7px 16px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: .78rem;
    color: #666;
    transition: border-color .2s, background .2s, color .2s;
}

.dzc-rating-option:hover span,
.dzc-rating-option--active span {
    border-color: #0B8258;
    background: #0B8258;
    color: #fff;
}

.dzc-star-preview {
    display: none;
}

.dzc-star-preview .dzc-star-svg {
    width: 24px;
    height: 24px;
}

.logged-in-as {
    display: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .dzc-comment-card {
        flex-direction: column;
        padding: 16px;
    }

    .dzc-comment-card__content-col,
    .dzc-comment-card__meta-col {
        width: 100%;
        padding: 16px;
    }

    .dzc-comment-card__meta-col {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .dzc-comment-card__meta-col-top {
        flex-direction: row;
        text-align: right;
        gap: 12px;
        flex-wrap: wrap;
        width: 100%;
        margin-bottom: 16px;
    }

    .dzc-comment__avatar {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }

    .dzc-comment-card__author {
        margin-bottom: 0;
    }

    .dzc-comment-card__date,
    .dzc-comment-card__rating {
        margin-bottom: 0;
    }

    .dzc-btn--reply {
        width: auto;
    }

    .dzc-rating-options {
        flex-direction: row;
    }

    .dzc-comment-item .children {
        padding-right: 14px;
    }

    .dzc-no-comments {
        padding: 24px 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .dzc-btn {
        padding: 12px 24px;
        font-size: 14px;
        line-height: 20px;
    }

    .dzc-form-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .dzc-comment-form {
        padding: 16px;
    }

    #comments .children {
        padding-inline-start: 0 !important;
    }
}