/* =============================================
   Vendor Testimonial Module - Frontend Styles
   ============================================= */

/* ---- Page Header ---- */
.testimonial-page { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.testimonial-page-header {
    text-align: center;
    padding: 50px 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 40px;
    color: #fff;
}
.testimonial-page-header .page-title { color: #fff; font-size: 2.2rem; margin-bottom: 10px; }
.testimonial-subtitle { font-size: 1.1rem; opacity: .85; margin: 0; }

/* ---- Testimonial Grid ---- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
    align-items: stretch;
}

.testimonial-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
    height: 330px;
    display: flex;
    border: 1px solid #eef0f5;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
}
.testimonial-card-inner {
    padding: 22px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---- Stars ---- */
.testimonial-stars, .testimonial-rating { margin-bottom: 12px; }
.testimonial-stars .star, .testimonial-rating .star { font-size: 1.2rem; color: #d1d5db; }
.testimonial-stars .star.filled, .testimonial-rating .star.filled { color: #f59e0b; }
.testimonial-rating {
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* ---- Message ---- */
.testimonial-message {
    font-size: .95rem;
    line-height: 1.65;
    color: #4b5563;
    margin: 0;
    font-style: italic;
    border-left: 3px solid #667eea;
    padding-left: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    line-clamp: 6;
    flex: 1 1 auto;
    min-height: 158px;
}
blockquote.testimonial-message p { margin: 0; }

/* ---- Author ---- */
.testimonial-author { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.testimonial-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: bold;
    flex-shrink: 0;
}
.testimonial-author-info { display: flex; flex-direction: column; gap: 2px; }
.author-name {
    font-size: .95rem;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.author-designation {
    font-size: .82rem;
    color: #6b7280;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.testimonial-date { font-size: .78rem; color: #9ca3af; }

/* ---- Empty State ---- */
.testimonial-empty {
    text-align: center;
    padding: 60px;
    color: #9ca3af;
    font-size: 1.1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

/* ---- Form ---- */
.testimonial-form-section {
    background: #f8f7ff;
    border-radius: 12px;
    padding: 50px 40px;
    margin-bottom: 50px;
}
.testimonial-form-wrap { max-width: 760px; margin: 0 auto; }
.form-section-title { font-size: 1.8rem; color: #1f2937; margin-bottom: 6px; text-align: center; }
.form-section-subtitle { text-align: center; color: #6b7280; margin-bottom: 36px; }

.field-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.field { margin-bottom: 22px; }
.field .label { display: block; font-weight: 600; margin-bottom: 7px; color: #374151; font-size: .9rem; }
.field .label em { font-weight: 400; font-style: normal; color: #9ca3af; }
.field .input-text,
.field textarea {
    width: 100%; padding: 11px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: .95rem;
    transition: border-color .2s;
    box-sizing: border-box;
}
.field .input-text:focus,
.field textarea:focus { border-color: #667eea; outline: none; box-shadow: 0 0 0 3px rgba(102,126,234,.15); }

/* Star rating input */
.star-rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-rating-input input[type="radio"] { display: none; }
.star-rating-input label {
    font-size: 2rem; color: #d1d5db; cursor: pointer;
    transition: color .15s;
}
.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label { color: #f59e0b; }

.form-actions { text-align: center; margin-top: 10px; }
.action.submit.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}
.action.submit.primary:hover { opacity: .9; transform: translateY(-1px); }

/* =============================================
   Homepage Section
   ============================================= */
.testimonial-homepage-section {
    background: linear-gradient(180deg, #f8f7ff 0%, #ffffff 100%);
    padding: 70px 20px;
    margin: 40px 0;
}
.testimonial-homepage-inner { max-width: 1100px; margin: 0 auto; }

.testimonial-section-header { text-align: center; margin-bottom: 40px; }
.testimonial-section-title { font-size: 2rem; color: #1f2937; margin-bottom: 10px; }
.testimonial-section-subtitle { color: #6b7280; font-size: 1.05rem; }

/* Slider */
.testimonial-slider-wrap { position: relative; }
.testimonial-slider { position: relative; min-height: 300px; overflow: hidden; }
.testimonial-slide {
    display: none;
    inset: 0;
    position: absolute;
    width: 100%;
}
.testimonial-slide.active { display: block; position: relative; }

.homepage-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 36px 40px;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(102,126,234,.12);
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}
.quote-icon {
    font-size: 5rem;
    line-height: 1;
    color: #e0e7ff;
    font-family: Georgia, serif;
    position: absolute;
    top: 10px; left: 20px;
}
.homepage-card .testimonial-rating { justify-content: center; display: flex; gap: 4px; margin-bottom: 18px; }
.homepage-card .testimonial-message {
    font-size: 1.02rem;
    color: #374151;
    line-height: 1.8;
    margin: 0 0 20px;
    font-style: italic;
    border: none;
    padding: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    min-height: 60px;
}
.homepage-card .testimonial-author { justify-content: center; }
.homepage-card .testimonial-avatar { width: 56px; height: 56px; font-size: 1.5rem; }

/* Slider Nav */
.testimonial-slider-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; margin-top: 28px;
}
.slider-btn {
    width: 28px; height: 28px;
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color .2s;
}
.slider-btn:hover { color: #667eea; }
.slider-dots { display: flex; align-items: center; gap: 8px; }
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.dot.active { background: #667eea; }

.testimonial-cta { text-align: center; margin-top: 36px; }
.testimonial-cta .action.secondary {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.testimonial-cta .action.secondary:hover { background: #667eea; color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .field-row.two-col { grid-template-columns: 1fr; }
    .testimonial-form-section { padding: 30px 20px; }
    .homepage-card { padding: 24px 20px; height: auto; min-height: 280px; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .testimonial-card { height: auto; min-height: 300px; }
    .testimonial-message { min-height: auto; }
    .homepage-card .testimonial-message { min-height: auto; -webkit-line-clamp: 4; line-clamp: 4; }
}
