/**
 * MN Testimony Widget Styles
 * 
 * @package MN_Elements
 * @since 1.8.3
 */

/* ==========================================================================
   Base Wrapper Styles
   ========================================================================== */

.mn-testimony-wrapper {
    position: relative;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.mn-testimony-wrapper.has-arrows {
    padding: 0 25px;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.mn-testimony-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==========================================================================
   Carousel Layout
   ========================================================================== */

.mn-testimony-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.mn-testimony-track {
    display: flex;
    transition: transform 0.5s ease;
}

.mn-testimony-carousel .mn-testimony-item {
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* ==========================================================================
   Testimony Item
   ========================================================================== */

.mn-testimony-item {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mn-testimony-item:hover {
    transform: translateY(-5px);
}

/* ==========================================================================
   Quote Icon
   ========================================================================== */

.mn-testimony-quote {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 15px;
    color: #F6A756;
}

.mn-testimony-quote svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* ==========================================================================
   Content
   ========================================================================== */

.mn-testimony-content {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 20px;
    font-style: italic;
}

/* ==========================================================================
   Rating
   ========================================================================== */

.mn-testimony-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.mn-rating-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #E0E0E0;
    transition: color 0.3s ease;
}

.mn-rating-star.active {
    color: #FFD700;
}

.mn-rating-star svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* ==========================================================================
   User Section
   ========================================================================== */

.mn-testimony-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Horizontal Layout (Avatar Left) - Default */
.mn-user-horizontal .mn-testimony-user {
    flex-direction: row;
}

/* Horizontal Layout (Avatar Right) */
.mn-user-horizontal-right .mn-testimony-user {
    flex-direction: row-reverse;
}

/* Vertical Layout (Avatar Top) */
.mn-user-vertical .mn-testimony-user {
    flex-direction: column;
    text-align: center;
}

.mn-user-vertical .mn-testimony-user-details {
    text-align: center;
}

/* ==========================================================================
   Alignment
   ========================================================================== */

.mn-align-left .mn-testimony-item {
    text-align: left;
    align-items: flex-start;
}

.mn-align-left .mn-testimony-user {
    justify-content: flex-start;
}

.mn-align-center .mn-testimony-item {
    text-align: center;
    align-items: center;
}

.mn-align-center .mn-testimony-user {
    justify-content: center;
}

.mn-align-right .mn-testimony-item {
    text-align: right;
    align-items: flex-end;
}

.mn-align-right .mn-testimony-user {
    justify-content: flex-end;
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.mn-testimony-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.mn-testimony-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   User Details
   ========================================================================== */

.mn-testimony-user-details {
    display: flex;
    flex-direction: column;
}

.mn-testimony-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 2px;
}

.mn-testimony-user-info {
    font-size: 14px;
    color: #777777;
}

/* ==========================================================================
   Content Position Variations
   ========================================================================== */

/* Content Top (Default) */
.mn-content-top .mn-testimony-item {
    flex-direction: column;
}

/* Content Bottom */
.mn-content-bottom .mn-testimony-item {
    flex-direction: column;
}

.mn-content-bottom .mn-testimony-content {
    order: 2;
    margin-bottom: 0;
    margin-top: 20px;
}

.mn-content-bottom .mn-testimony-user {
    order: 1;
}

.mn-content-bottom .mn-testimony-quote {
    order: 0;
}

/* Content Left */
.mn-content-left .mn-testimony-item {
    flex-direction: row;
    align-items: flex-start;
}

.mn-content-left .mn-testimony-content {
    flex: 1;
    margin-bottom: 0;
    margin-right: 20px;
}

.mn-content-left .mn-testimony-user {
    flex-shrink: 0;
}

/* Content Right */
.mn-content-right .mn-testimony-item {
    flex-direction: row-reverse;
    align-items: flex-start;
}

.mn-content-right .mn-testimony-content {
    flex: 1;
    margin-bottom: 0;
    margin-left: 20px;
}

.mn-content-right .mn-testimony-user {
    flex-shrink: 0;
}

/* Username-Content Top */
.mn-content-username_top .mn-testimony-item {
    flex-direction: column;
}

.mn-content-username_top .mn-testimony-username-top {
    order: 0;
    margin-bottom: 8px;
}

.mn-content-username_top .mn-testimony-content {
    order: 1;
    margin-bottom: 0;
}

.mn-content-username_top .mn-testimony-rating {
    order: 2;
    margin-top: 10px;
    margin-bottom: 0;
}

.mn-content-username_top .mn-testimony-user {
    order: 3;
    margin-top: 15px;
}

/* ==========================================================================
   Navigation - Arrows
   ========================================================================== */

.mn-testimony-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333333;
    background: none;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

.mn-testimony-arrow svg,
.mn-testimony-arrow img {
    width: 1em;
    height: 1em;
    display: block;
    flex-shrink: 0;
}

.mn-testimony-arrow i {
    font-size: 1em;
    line-height: 1;
    display: block;
    flex-shrink: 0;
}

.mn-testimony-prev {
    left: 0;
}

.mn-testimony-next {
    right: 0;
}

/* Arrow Position: Top Center */
.mn-arrows-top-center {
    padding: 0;
}

.mn-arrows-top-center .mn-testimony-arrows-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Arrow Position: Bottom Center */
.mn-arrows-bottom-center {
    padding: 0;
}

.mn-arrows-bottom-center .mn-testimony-arrows-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* Reset absolute positioning and fixed sizing for grouped arrows (top/bottom center) */
.mn-arrows-top-center .mn-testimony-arrow,
.mn-arrows-bottom-center .mn-testimony-arrow {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: auto;
    height: auto;
}

/* ==========================================================================
   Navigation - Dots
   ========================================================================== */

.mn-testimony-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.mn-testimony-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cccccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.mn-testimony-dot:hover,
.mn-testimony-dot.active {
    background-color: #F6A756;
}

/* ==========================================================================
   Theme - Light
   ========================================================================== */

.mn-theme-light .mn-testimony-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.mn-theme-light .mn-testimony-content {
    color: #555555;
}

.mn-theme-light .mn-testimony-user-name {
    color: #333333;
}

.mn-theme-light .mn-testimony-user-info {
    color: #777777;
}

.mn-theme-light .mn-testimony-quote {
    color: #F6A756;
}

/* Light Theme Hover */
.mn-theme-light .mn-testimony-item:hover {
    background-color: #2c3e50;
    border-color: #34495e;
}

.mn-theme-light .mn-testimony-item:hover .mn-testimony-content {
    color: #ecf0f1;
}

.mn-theme-light .mn-testimony-item:hover .mn-testimony-user-name {
    color: #ffffff;
}

.mn-theme-light .mn-testimony-item:hover .mn-testimony-user-info {
    color: #bdc3c7;
}

.mn-theme-light .mn-testimony-item:hover .mn-testimony-quote {
    color: #3498db;
}

/* ==========================================================================
   Theme - Dark
   ========================================================================== */

.mn-theme-dark .mn-testimony-item {
    background-color: #2c3e50;
    border: 1px solid #34495e;
}

.mn-theme-dark .mn-testimony-content {
    color: #ecf0f1;
}

.mn-theme-dark .mn-testimony-user-name {
    color: #ffffff;
}

.mn-theme-dark .mn-testimony-user-info {
    color: #bdc3c7;
}

.mn-theme-dark .mn-testimony-quote {
    color: #3498db;
}

/* Dark Theme Hover */
.mn-theme-dark .mn-testimony-item:hover {
    background-color: #ffffff;
    border-color: #e0e0e0;
}

.mn-theme-dark .mn-testimony-item:hover .mn-testimony-content {
    color: #555555;
}

.mn-theme-dark .mn-testimony-item:hover .mn-testimony-user-name {
    color: #333333;
}

.mn-theme-dark .mn-testimony-item:hover .mn-testimony-user-info {
    color: #777777;
}

.mn-theme-dark .mn-testimony-item:hover .mn-testimony-quote {
    color: #F6A756;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .mn-testimony-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mn-testimony-prev {
        left: 0;
    }

    .mn-testimony-next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .mn-testimony-grid {
        grid-template-columns: 1fr;
    }

    .mn-testimony-item {
        padding: 20px;
    }

    /* Stack content on mobile for left/right positions */
    .mn-content-left .mn-testimony-item,
    .mn-content-right .mn-testimony-item {
        flex-direction: column;
    }

    .mn-content-left .mn-testimony-content,
    .mn-content-right .mn-testimony-content {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 20px;
    }

    .mn-testimony-arrow {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .mn-testimony-item,
    .mn-testimony-arrow,
    .mn-testimony-dot,
    .mn-testimony-track {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mn-testimony-item {
        border-width: 2px;
    }

    .mn-testimony-arrow {
        border: 2px solid currentColor;
    }

    .mn-testimony-dot {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .mn-testimony-wrapper {
        page-break-inside: avoid;
    }

    .mn-testimony-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #cccccc;
    }

    .mn-testimony-arrow,
    .mn-testimony-dots {
        display: none;
    }

    .mn-testimony-carousel .mn-testimony-track {
        flex-wrap: wrap;
    }

    .mn-testimony-carousel .mn-testimony-item {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
}
