.ftm-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.ftm-form label {
    display: block;
    margin-bottom: 5px;
}

.ftm-form input[type="text"],
.ftm-form input[type="email"],
.ftm-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ftm-form input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ftm-form input[type="submit"]:hover {
    background-color: #45a049;
}

.ftm-rating-text {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
}

.ftm-rating {
    text-align: center;
    direction: rtl;
    unicode-bidi: bidi-override;
}

.ftm-rating > input {
    display: none;
}

.ftm-rating > label {
    display: inline-block;
    position: relative;
    width: 1.1em;
    font-size: 50px;
    color: #ccc;
    cursor: pointer;
}

.ftm-rating > label:before {
    content: "\2605";
    position: absolute;
    opacity: 0;
}

.ftm-rating > label:hover:before,
.ftm-rating > label:hover ~ label:before,
.ftm-rating > input:checked ~ label:before,
.ftm-rating > label.hovered:before {
    opacity: 1;
    color: #ffc107;
}

#ftm_form_message {
    margin-top: 20px;
    padding: 10px;
    background-color: #e7f3fe;
    border: 1px solid #b6d4fe;
    border-radius: 4px;
}

.ftm-testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}

.ftm-testimonial {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 250px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ftm-testimonial-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    float: left;
}

.ftm-testimonial-content {
    overflow: hidden;
}

.ftm-testimonial-name {
    font-weight: bold;
    font-size: 1em;
    display: block;
    margin-bottom: 5px;
}

.ftm-testimonial-rating {
    color: #FFD700;
    font-size: 18px;
    margin-bottom: 10px;
}

.ftm-testimonial-text {
    margin-bottom: 10px;
}

.ftm-read-more {
    color: #4CAF50;
    text-decoration: none;
}

.ftm-read-more:hover {
    text-decoration: underline;
}

.ftm-review-platforms {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.ftm-review-platforms li {
    margin: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ftm-review-platforms img {
    max-width: 100px;
    max-height: 50px;
    margin-bottom: 10px;
}

.ftm-platform-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.ftm-review-button {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
}

.ftm-review-button:hover {
    background-color: #45a049;
}

.ftm-publish-options {
    display: inline-flex;
    align-items: center;
}

.ftm-publish-options input[type="radio"] {
    margin-right: 5px;
}

.ftm-publish-options label {
    margin-right: 15px;
}

/* Template 2 */
.ftm-template-2 .ftm-testimonials {
    flex-direction: column;
}

.ftm-template-2 .ftm-testimonial {
    width: 100%;
    flex-basis: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.ftm-template-2 .ftm-testimonial-image {
    width: 100px;
    height: 100px;
    margin-right: 30px;
    float: none;
}

.ftm-template-2 .ftm-testimonial-content {
    flex: 1;
}

/* Template 3 - Profile Style */
.ftm-template-3 .ftm-testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.ftm-template-3 .ftm-testimonial {
    flex: 0 0 auto;
    width: 170px;
    text-align: center;
    padding: 15px;
    background-color: #2b2d33;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ftm-template-3 .ftm-testimonial-image {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    float: none;
    border: 3px solid #3b3d45;
}

.ftm-template-3 .ftm-testimonial-content {
    width: 100%;
    text-align: center;
}

.ftm-template-3 .ftm-testimonial-name {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #ffffff;
}

.ftm-template-3 .ftm-testimonial-product {
    display: block;
    font-size: 0.9em;
    color: #a8a9b4;
    margin-bottom: 12px;
}

.ftm-template-3 .ftm-testimonial-text {
    display: none;
}

.ftm-template-3 .ftm-testimonial-full {
    display: none;
}

/* Testimonial Blob Circle Style */
.ftm-testimonial-blob {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 580px;
    height: 65px;
    margin: 0 auto;
    padding: 0;
}

.ftm-blob-item {
    position: relative;
    margin-left: -15px;
    z-index: 1;
}

.ftm-blob-item:first-child {
    margin-left: 0;
    z-index: 9;
}

.ftm-blob-item:nth-child(2) {
    z-index: 8;
}

.ftm-blob-item:nth-child(3) {
    z-index: 7;
}

.ftm-blob-item:nth-child(4) {
    z-index: 6;
}

.ftm-blob-item:nth-child(5) {
    z-index: 5;
}

.ftm-blob-item:nth-child(6) {
    z-index: 4;
}

.ftm-blob-item:nth-child(7) {
    z-index: 3;
}

.ftm-blob-item:nth-child(8) {
    z-index: 2;
}

.ftm-blob-item:nth-child(9) {
    z-index: 1;
}

.ftm-blob-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

/* Hover effect to slightly enlarge the profile image */
.ftm-blob-item:hover .ftm-blob-image {
    transform: scale(1.15);
    z-index: 20;
    position: relative;
}

/* Responsive adjustments for blob layout */
@media (max-width: 580px) {
    .ftm-testimonial-blob {
        max-width: 400px;
    }
    
    .ftm-blob-image {
        width: 40px;
        height: 40px;
    }
    
    .ftm-blob-item {
        margin-left: -12px;
    }
}

@media (max-width: 768px) {
    .ftm-testimonial {
        flex-basis: 100%;
    }
    
    .ftm-template-2 .ftm-testimonial {
        flex-direction: column;
        text-align: center;
    }
    
    .ftm-template-2 .ftm-testimonial-image {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .ftm-template-3 .ftm-testimonials {
        gap: 15px;
    }
}

/* Fix for Elementor compatibility */
.elementor-widget-container .ftm-testimonial-blob {
    display: flex !important;
    justify-content: center !important;
    position: relative !important;
    width: 100% !important;
    max-width: 580px !important;
    height: 65px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.elementor-widget-container .ftm-blob-item {
    position: relative !important;
    margin-left: -15px !important;
    z-index: 1 !important;
}

.elementor-widget-container .ftm-blob-item:first-child {
    margin-left: 0 !important;
    z-index: 9 !important;
}

.elementor-widget-container .ftm-blob-item:nth-child(2) { z-index: 8 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(3) { z-index: 7 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(4) { z-index: 6 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(5) { z-index: 5 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(6) { z-index: 4 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(7) { z-index: 3 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(8) { z-index: 2 !important; }
.elementor-widget-container .ftm-blob-item:nth-child(9) { z-index: 1 !important; }

/* Direct override for Elementor img styles that are breaking our circles */
.elementor .ftm-blob-image,
.elementor-widget-container .ftm-blob-image {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s ease !important;
    max-width: none !important; /* Override Elementor's max-width:100% */
}

.elementor-widget-container .ftm-blob-item:hover .ftm-blob-image {
    transform: scale(1.15) !important;
    z-index: 20 !important;
    position: relative !important;
}

@media (max-width: 580px) {
    .elementor-widget-container .ftm-testimonial-blob {
        max-width: 400px !important;
    }
    
    .elementor .ftm-blob-image,
    .elementor-widget-container .ftm-blob-image {
        width: 40px !important;
        height: 40px !important;
    }
    
    .elementor-widget-container .ftm-blob-item {
        margin-left: -12px !important;
    }
}

/* Fix for Template 1 and 2 images in Elementor */
.elementor .ftm-testimonial-image,
.elementor-widget-container .ftm-testimonial-image {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-right: 15px !important;
    float: left !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    max-width: none !important;
}

/* Template 2 images in Elementor */
.elementor .ftm-template-2 .ftm-testimonial-image,
.elementor-widget-container .ftm-template-2 .ftm-testimonial-image {
    width: 100px !important;
    height: 100px !important;
    margin-right: 30px !important;
    float: none !important;
}

/* Template 3 images in Elementor */
.elementor .ftm-template-3 .ftm-testimonial-image,
.elementor-widget-container .ftm-template-3 .ftm-testimonial-image {
    width: 75px !important;
    height: 75px !important;
    border-radius: 50% !important;
    margin: 0 auto 12px !important;
    float: none !important;
    border: 3px solid #3b3d45 !important;
}

/* Responsive fixes for template images in Elementor */
@media (max-width: 768px) {
    .elementor .ftm-template-2 .ftm-testimonial-image,
    .elementor-widget-container .ftm-template-2 .ftm-testimonial-image {
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
}

/* Center alignment fixes for Template 3 in Elementor full-width */
.elementor .ftm-template-3,
.elementor-widget-container .ftm-template-3,
.elementor-section-full_width .ftm-template-3 {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.elementor .ftm-template-3 .ftm-testimonials,
.elementor-widget-container .ftm-template-3 .ftm-testimonials,
.elementor-section-full_width .ftm-template-3 .ftm-testimonials {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 25px !important;
    max-width: 1140px !important;
    margin: 0 auto !important;
}

/* Elementor Widget Notices - Only visible in editor */
.elementor-ftm-testimonials-notice,
.elementor-ftm-testimonial-blob-notice {
    background-color: #f7f7f7;
    border: 1px dashed #ccc;
    padding: 15px;
    text-align: center;
    border-radius: 5px;
}

.elementor-ftm-testimonials-notice h3,
.elementor-ftm-testimonial-blob-notice h3 {
    margin-top: 0;
    color: #555;
}

.elementor-ftm-testimonials-notice code,
.elementor-ftm-testimonial-blob-notice code {
    background: #e7e7e7;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
}