/* ==========================================================================
   Custom Testimonials & Reviews — Frontend Styles
   Everything is scoped under .ct-wrap so it never leaks into / clashes
   with Elementor or theme styles.
   ========================================================================== */

.ct-wrap, .ct-wrap * {
    box-sizing: border-box;
}

.ct-wrap {
    font-family: "Poppins", Sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: #333333;
}

/* -------------------- Review Grid -------------------- */

.ct-testimonial-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(3, 1fr);
    margin: 20px 0;
}

.ct-testimonial-grid.ct-columns-1 { grid-template-columns: repeat(1, 1fr); }
.ct-testimonial-grid.ct-columns-2 { grid-template-columns: repeat(2, 1fr); }
.ct-testimonial-grid.ct-columns-3 { grid-template-columns: repeat(3, 1fr); }
.ct-testimonial-grid.ct-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .ct-testimonial-grid.ct-columns-3,
    .ct-testimonial-grid.ct-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ct-testimonial-grid {
        grid-template-columns: 1fr !important;
    }
}

/* -------------------- Review Card -------------------- */

.ct-review-card {
    background: #ffffff;
    border: 1px solid #cfe3f5;
    border-radius: 14px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 10px rgba(20, 40, 80, 0.04);
}

.ct-quote-icon {
    color: #d9a441;
    margin-bottom: 14px;
}

.ct-review-text {
    font-family: "Poppins", Sans-serif;
    font-size: 17px;
    font-weight: 400;
    font-style: italic;
    color: #3a3a3a;
    margin: 0 0 26px 0;
    flex-grow: 1;
    line-height: 1.7;
}

.ct-reviewer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.ct-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #d9a441;
    flex-shrink: 0;
}

.ct-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4fb;
    color: #1971c2;
    font-weight: 600;
    font-size: 16px;
}

.ct-reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ct-reviewer-name {
    font-weight: 600;
    font-size: 17px;
    color: #1971c2;
}

.ct-reviewer-title {
    font-size: 14px;
    color: #6b7280;
}

.ct-stars {
    display: flex;
    gap: 3px;
}

.ct-star-display {
    font-size: 18px;
    color: #d9d9d9;
    line-height: 1;
}

.ct-star-display.filled {
    color: #d9a441;
}

/* -------------------- Owner Reply -------------------- */

.ct-owner-reply {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f5f8fc;
    border-left: 3px solid #1971c2;
    border-radius: 8px;
}

.ct-owner-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.ct-owner-reply-icon {
    color: #1971c2;
    font-size: 14px;
    transform: scaleX(-1);
    display: inline-block;
}

.ct-owner-reply-author {
    font-weight: 600;
    font-size: 14px;
    color: #1971c2;
}

.ct-owner-reply-text {
    font-family: "Poppins", Sans-serif;
    font-size: 15px;
    font-weight: 400;
    font-style: normal;
    color: #444444;
    margin: 0;
    line-height: 1.6;
}

/* -------------------- Admin inline reply control (front-end, admin-only) -------------------- */

.ct-admin-reply-control {
    margin-top: 12px;
}

.ct-reply-toggle-btn {
    background: none;
    border: 1px dashed #a9b4c2;
    border-radius: 6px;
    color: #6b7280;
    font-family: "Poppins", Sans-serif;
    font-size: 13px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ct-reply-toggle-btn:hover {
    border-color: #1971c2;
    color: #1971c2;
}

.ct-reply-form {
    margin-top: 10px;
    padding: 12px;
    background: #fafbfc;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

.ct-reply-author-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    font-family: "Poppins", Sans-serif;
    font-size: 13px;
    margin-bottom: 8px;
}

.ct-reply-text-input {
    width: 100%;
    min-height: 70px;
    padding: 8px 10px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    font-family: "Poppins", Sans-serif;
    font-size: 14px;
    resize: vertical;
}

.ct-reply-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.ct-reply-save-btn {
    background: #1971c2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-family: "Poppins", Sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.ct-reply-save-btn:hover {
    background: #15599e;
}

.ct-reply-cancel-btn {
    background: none;
    border: none;
    color: #888;
    font-family: "Poppins", Sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.ct-reply-status {
    font-size: 12px;
}

.ct-no-reviews {
    font-family: "Poppins", Sans-serif;
    color: #666;
    text-align: center;
    padding: 30px;
}

/* -------------------- Submission Form -------------------- */

.ct-form-card {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    padding: 36px;
    max-width: 640px;
    margin: 20px auto;
    box-shadow: 0 2px 12px rgba(20, 40, 80, 0.05);
}

.ct-form-title {
    font-family: "Poppins", Sans-serif;
    font-weight: 600;
    font-size: 22px;
    margin: 0 0 22px 0;
    color: #1f2933;
}

.ct-form-group {
    margin-bottom: 20px;
}

.ct-form-group label {
    display: block;
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 8px;
    color: #1f2933;
}

.ct-form-group input[type="text"],
.ct-form-group input[type="file"],
.ct-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    font-family: "Poppins", Sans-serif;
    font-size: 15px;
    color: #1f2933;
    background: #fbfcfd;
    transition: border-color 0.15s ease;
}

.ct-form-group input[type="text"]:focus,
.ct-form-group textarea:focus {
    outline: none;
    border-color: #1971c2;
    background: #ffffff;
}

.ct-form-group textarea {
    resize: vertical;
}

/* Star rating input */
.ct-star-input {
    display: flex;
    gap: 6px;
    font-size: 30px;
    cursor: pointer;
}

.ct-star-input .ct-star {
    color: #d9d9d9;
    transition: color 0.15s ease;
}

.ct-star-input .ct-star.active {
    color: #d9a441;
}

.ct-submit-btn {
    background: #1971c2;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 13px 30px;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.ct-submit-btn:hover {
    background: #15599e;
}

.ct-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ct-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

.ct-form-message.ct-success {
    background: #e6f6ec;
    color: #1e7e39;
    border: 1px solid #b7e3c4;
}

.ct-form-message.ct-error {
    background: #fdecec;
    color: #b3261e;
    border: 1px solid #f5c2c0;
}
