/* =====================================================
   Arabic Comments Elementor Widget – acw-style.css
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

.acw-wrapper {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Form Card ─────────────────────────────────────── */
.acw-form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.acw-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.acw-input {
    background: #f4f4f4;
    border: 1.5px solid transparent;
    border-radius: 10px !important;
    padding: 13px 18px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #333;
    outline: none !important;
    border: none !important;
    transition: border-color 0.2s, background 0.2s;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

.acw-input::placeholder { color: #aaa; }
.acw-input:focus {
    border: solid 1px #e8682a !important;
    background: #fff;
}

.acw-textarea {
    width: 100%;
    background: #f4f4f4;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 13px 18px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #333;
    outline: none;
    resize: vertical;
    min-height: 110px;
    transition: border-color 0.2s, background 0.2s;
    text-align: right;
    display: block;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.acw-textarea::placeholder { color: #aaa; }
.acw-textarea:focus {
    border-color: #e8682a;
    background: #fff;
}

.acw-submit-btn {
    background: linear-gradient(135deg, #e8682a 0%, #d45a1e 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 13px 36px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(232, 104, 42, 0.35);
    display: inline-block;
}

.acw-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 104, 42, 0.45);
}

.acw-submit-btn:active { transform: translateY(0); }
.acw-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.acw-success-msg {
    margin-top: 12px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.acw-error-msg {
    margin-top: 12px;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #c62828;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Comment Card ──────────────────────────────────── */
.acw-comment-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: acwSlideIn 0.3s ease;
}

@keyframes acwSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.acw-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acw-author-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acw-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8682a, #d45a1e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.acw-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.acw-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    display: block;
}

.acw-time {
    font-size: 12px;
    color: #aaa;
    display: block;
}

.acw-comment-body {
    font-size: 14px;
    color: #555;
    line-height: 1.85;
}

.acw-comment-footer {
    display: flex;
    justify-content: flex-start;
}

.acw-reply-btn {
    background: none;
    border: none;
    color: #e8682a;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.acw-reply-btn:hover {
    color: #d45a1e;
    text-decoration: underline;
}

/* ── Nested Replies ────────────────────────────────── */
.acw-replies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 16px;
    border-right: 2px solid #f0ece9;
    margin-top: 4px;
}

.acw-reply-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.acw-reply-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0a070, #e8682a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.acw-reply-content { flex: 1; }

.acw-reply-text {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
    line-height: 1.75;
}

/* ── Inline Reply Form ─────────────────────────────── */
.acw-reply-form {
    background: #fafafa;
    border: 1px solid #f0ece9;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.acw-reply-form .acw-textarea {
    min-height: 75px;
    margin-bottom: 0;
    font-size: 13px;
}

.acw-reply-form .acw-input { font-size: 13px; }

.acw-reply-submit {
    padding: 10px 26px;
    font-size: 13px;
    align-self: flex-start;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 580px) {
    .acw-form-row {
        grid-template-columns: 1fr;
    }

    .acw-form-card,
    .acw-comment-card {
        padding: 18px;
    }
}
