/**
 * Simple Testimonials Plugin Styles
 * All classes are prefixed with .st- to avoid conflicts
 */

/* Wrapper styles */
.st-testimonials-wrapper {
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
}

.st-no-testimonials {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Grid layout (non-carousel) */
.st-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(var(--st-cards-per-row, 3), 1fr);
    gap: 20px;
    width: 100%;
}

/* Testimonial card */
.st-testimonial-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0;
}

.st-testimonial-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.st-testimonial-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Client photo */
.st-testimonial-photo {
    text-align: center;
    margin-bottom: 20px;
}

.st-client-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

/* Testimonial content */
.st-testimonial-content {
    flex-grow: 1;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

.st-testimonial-content p:first-child {
    margin-top: 0;
}

.st-testimonial-content p:last-child {
    margin-bottom: 0;
}

/* Read more functionality */
.st-content-wrapper {
    display: block;
}

.st-content-short,
.st-content-full {
    margin-bottom: 8px;
}

.st-read-more-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 12px;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
    display: inline-block;
}

.st-read-more-btn:hover {
    color: #2980b9;
}

.st-read-more-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Star rating */
.st-testimonial-rating {
    margin-bottom: 15px;
    text-align: center;
}

.st-stars {
    display: inline-block;
    font-size: 20px;
    color: #ffa500;
    letter-spacing: 2px;
}

.st-star {
    display: inline-block;
}

.st-star-filled {
    color: #ffa500;
}

.st-star-empty {
    color: #ddd;
}

/* Client meta information */
.st-testimonial-meta {
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.st-client-name {
    font-weight: 600;
    font-size: 16px;
    color: #222;
    margin-bottom: 5px;
}

.st-client-position {
    font-size: 14px;
    color: #777;
    font-style: italic;
}

.st-source-platform {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* Carousel-specific styles */
.st-testimonials-carousel {
    padding: 20px 10px 40px;
    overflow: visible;
}

.st-testimonials-carousel .swiper-wrapper {
    padding-bottom: 20px;
}

.st-testimonials-carousel .st-testimonial-item {
    height: auto;
    display: flex;
}

.st-testimonials-carousel .swiper-slide {
    height: auto;
    display: flex;
}

/* Swiper navigation spacing */
.st-testimonials-carousel .swiper-pagination {
    position: relative;
    margin-top: 20px;
    bottom: auto;
}

.st-testimonials-carousel .swiper-button-next,
.st-testimonials-carousel .swiper-button-prev {
    top: 50%;
    transform: translateY(-50%);
}

/* Ensure cards have full height in carousel */
.st-testimonials-carousel .st-testimonial-card {
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .st-testimonials-grid {
        grid-template-columns: 1fr;
    }

    .st-testimonial-card {
        padding: 20px;
    }
}

/* Admin metabox styles */
.st-metabox-wrapper {
    padding: 10px 0;
}

.st-metabox-wrapper p {
    margin: 15px 0;
}

.st-metabox-wrapper label {
    display: block;
    margin-bottom: 5px;
}

.st-photo-preview {
    margin-top: 10px;
}

/* Dark theme support */
[data-theme="dark"] .st-testimonial-card {
    background: #1e1e1e;
    border-color: #3a3a3a;
    color: #e0e0e0;
}

[data-theme="dark"] .st-testimonial-content {
    color: #e0e0e0;
}

[data-theme="dark"] .st-client-name {
    color: #ffffff;
}

[data-theme="dark"] .st-client-position {
    color: #b0b0b0;
}

[data-theme="dark"] .st-source-platform {
    color: #909090;
}

[data-theme="dark"] .st-testimonial-meta {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] .st-client-photo {
    border-color: #3a3a3a;
}

[data-theme="dark"] .st-read-more-btn {
    color: #5dade2;
}

[data-theme="dark"] .st-read-more-btn:hover {
    color: #85c1e9;
}

[data-theme="dark"] .st-read-more-btn:focus {
    outline-color: #5dade2;
}

/**
 * Minimal Style Preset
 * Simple, flat design with minimal styling
 */

.st-testimonials-wrapper.st-style-minimal .st-testimonial-card {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 25px;
    box-shadow: none;
}

.st-testimonials-wrapper.st-style-minimal .st-testimonial-card:hover {
    box-shadow: none;
    border-color: #333;
}

.st-testimonials-wrapper.st-style-minimal .st-client-photo {
    width: 60px;
    height: 60px;
    border-radius: 0;
    border: 1px solid #ddd;
}

.st-testimonials-wrapper.st-style-minimal .st-testimonial-content {
    color: #555;
    font-size: 15px;
}

.st-testimonials-wrapper.st-style-minimal .st-testimonial-meta {
    border-top: none;
    padding-top: 10px;
}

.st-testimonials-wrapper.st-style-minimal .st-client-name {
    font-weight: 500;
    font-size: 15px;
}

.st-testimonials-wrapper.st-style-minimal .st-stars {
    font-size: 16px;
}

/* Dark theme support for minimal style */
[data-theme="dark"] .st-testimonials-wrapper.st-style-minimal .st-testimonial-card {
    background: transparent;
    border-color: #555;
    color: #e0e0e0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-minimal .st-testimonial-card:hover {
    border-color: #999;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-minimal .st-client-photo {
    border-color: #555;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-minimal .st-testimonial-content {
    color: #d0d0d0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-minimal .st-client-name {
    color: #ffffff;
}
/**
 * Elegant Style Preset
 * Sophisticated design with elegant typography and subtle gradients
 */

.st-testimonials-wrapper.st-style-elegant .st-testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.st-testimonials-wrapper.st-style-elegant .st-testimonial-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.st-testimonials-wrapper.st-style-elegant .st-client-photo {
    width: 90px;
    height: 90px;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.st-testimonials-wrapper.st-style-elegant .st-testimonial-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    font-style: italic;
}

.st-testimonials-wrapper.st-style-elegant .st-testimonial-meta {
    border-top: 2px solid #e8e8e8;
    padding-top: 20px;
}

.st-testimonials-wrapper.st-style-elegant .st-client-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
}

.st-testimonials-wrapper.st-style-elegant .st-stars {
    font-size: 22px;
    color: #d4af37;
}

/* Dark theme support for elegant style */
[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-testimonial-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-testimonial-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-client-photo {
    border-color: #3a3a3a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-testimonial-content {
    color: #d0d0d0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-testimonial-meta {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-elegant .st-client-name {
    color: #f0f0f0;
}
/**
 * Modern Style Preset
 * Bold, contemporary design with vibrant colors
 */

.st-testimonials-wrapper.st-style-modern .st-testimonial-card {
    background: #fff;
    border: none;
    border-left: 5px solid #3498db;
    border-radius: 4px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15);
}

.st-testimonials-wrapper.st-style-modern .st-testimonial-card:hover {
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.25);
    border-left-color: #2980b9;
}

.st-testimonials-wrapper.st-style-modern .st-client-photo {
    width: 75px;
    height: 75px;
    border: 4px solid #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.st-testimonials-wrapper.st-style-modern .st-testimonial-content {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
}

.st-testimonials-wrapper.st-style-modern .st-testimonial-rating {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 10px;
    border-radius: 4px;
    margin: 15px -5px;
}

.st-testimonials-wrapper.st-style-modern .st-stars {
    font-size: 20px;
    color: #fff;
}

.st-testimonials-wrapper.st-style-modern .st-testimonial-meta {
    border-top: 2px solid #ecf0f1;
    padding-top: 15px;
}

.st-testimonials-wrapper.st-style-modern .st-client-name {
    font-weight: 700;
    font-size: 17px;
    color: #3498db;
}

.st-testimonials-wrapper.st-style-modern .st-client-position {
    color: #7f8c8d;
}

/* Dark theme support for modern style */
[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-testimonial-card {
    background: #2a2a2a;
    border-left-color: #5dade2;
    box-shadow: 0 4px 20px rgba(93, 173, 226, 0.2);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-testimonial-card:hover {
    box-shadow: 0 8px 32px rgba(93, 173, 226, 0.3);
    border-left-color: #5dade2;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-client-photo {
    border-color: #5dade2;
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.2);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-testimonial-content {
    color: #e0e0e0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-testimonial-rating {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-testimonial-meta {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-client-name {
    color: #5dade2;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-modern .st-client-position {
    color: #a0a0a0;
}
/**
 * Classic Style Preset
 * Traditional design with serif fonts and formal presentation
 */

.st-testimonials-wrapper.st-style-classic .st-testimonial-card {
    background: #fdfdfb;
    border: 2px solid #d4c5a0;
    border-radius: 0;
    padding: 35px;
    box-shadow: inset 0 0 0 1px rgba(212, 197, 160, 0.3);
    position: relative;
}

.st-testimonials-wrapper.st-style-classic .st-testimonial-card::before {
    content: '"';
    font-size: 80px;
    font-family: Georgia, serif;
    color: #d4c5a0;
    position: absolute;
    top: 10px;
    left: 15px;
    line-height: 1;
    opacity: 0.3;
}

.st-testimonials-wrapper.st-style-classic .st-testimonial-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(212, 197, 160, 0.5);
}

.st-testimonials-wrapper.st-style-classic .st-client-photo {
    width: 85px;
    height: 85px;
    border-radius: 0;
    border: 3px solid #d4c5a0;
    filter: sepia(10%);
}

.st-testimonials-wrapper.st-style-classic .st-testimonial-content {
    font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
    font-size: 17px;
    line-height: 1.9;
    color: #3a3a3a;
    text-align: justify;
}

.st-testimonials-wrapper.st-style-classic .st-testimonial-meta {
    border-top: 1px solid #d4c5a0;
    padding-top: 18px;
}

.st-testimonials-wrapper.st-style-classic .st-client-name {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 600;
    font-size: 19px;
    color: #2c2416;
}

.st-testimonials-wrapper.st-style-classic .st-client-position {
    font-family: Georgia, serif;
    font-size: 14px;
    color: #6b5d4f;
}

.st-testimonials-wrapper.st-style-classic .st-stars {
    font-size: 20px;
    color: #c9a961;
}

/* Dark theme support for classic style */
[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-testimonial-card {
    background: #2a2520;
    border-color: #4a4237;
    box-shadow: inset 0 0 0 1px rgba(74, 66, 55, 0.5);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-testimonial-card::before {
    color: #4a4237;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-testimonial-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(74, 66, 55, 0.7);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-client-photo {
    border-color: #4a4237;
    filter: sepia(20%);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-testimonial-content {
    color: #d0d0d0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-testimonial-meta {
    border-top-color: #4a4237;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-client-name {
    color: #e0dcd0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-client-position {
    color: #a09580;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-classic .st-stars {
    color: #d4af37;
}

/* Pagination styles */
.st-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px 0;
}

.st-pagination-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.st-pagination-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.st-pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.st-pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.st-pagination-loading {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #3498db;
}

/* Dark theme support for pagination */
[data-theme="dark"] .st-pagination-info {
    color: #e0e0e0;
}

[data-theme="dark"] .st-pagination-loading {
    background: rgba(30, 30, 30, 0.95);
    color: #5dade2;
}

/**
 * Horizontal Style Preset
 * Avatar on left, name/company stacked on right, with stars and content below
 */

/* Override base item styles for horizontal */
.st-testimonials-wrapper.st-style-horizontal .st-testimonial-item {
    display: block;
}

.st-testimonials-wrapper.st-style-horizontal .st-testimonial-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
}

.st-testimonials-wrapper.st-style-horizontal .st-testimonial-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Header section with avatar and name/company side by side */
.st-testimonials-wrapper.st-style-horizontal .st-testimonial-photo {
    flex: 0 0 70px;
    margin-right: 20px;
    margin-bottom: 0;
    text-align: left;
    order: 1;
}

.st-testimonials-wrapper.st-style-horizontal .st-client-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #f0f0f0;
    display: block;
}

.st-testimonials-wrapper.st-style-horizontal .st-testimonial-meta {
    flex: 1 1 auto;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 2;
}

.st-testimonials-wrapper.st-style-horizontal .st-client-name {
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.st-testimonials-wrapper.st-style-horizontal .st-client-position {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.st-testimonials-wrapper.st-style-horizontal .st-source-platform {
    font-size: 13px;
    color: #95a5a6;
    margin-top: 3px;
}

/* Rating stars below the header - full width */
.st-testimonials-wrapper.st-style-horizontal .st-testimonial-rating {
    flex: 0 0 100%;
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: left;
    order: 3;
}

.st-testimonials-wrapper.st-style-horizontal .st-stars {
    font-size: 18px;
    color: #f39c12;
}

/* Content section - full width */
.st-testimonials-wrapper.st-style-horizontal .st-testimonial-content {
    flex: 0 0 100% !important;
    flex-grow: 0 !important;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    text-align: left;
    margin: 0 !important;
    order: 4;
}

/* Dark theme support for horizontal style */
[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-testimonial-card {
    background: #2a2a2a;
    border-color: #3a3a3a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-testimonial-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-client-photo {
    border-color: #3a3a3a;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-client-name {
    color: #ecf0f1;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-client-position {
    color: #95a5a6;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-source-platform {
    color: #7f8c8d;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-testimonial-content {
    color: #d0d0d0;
}

[data-theme="dark"] .st-testimonials-wrapper.st-style-horizontal .st-stars {
    color: #f1c40f;
}
