/**
 * Reviews & Social Testimonials - Frontend Form Styles
 * Version: 1.0.5
 */

:root {
    /* Form General */
    --adsp-form-bg-color: #ffffff;
    --adsp-form-border-color: #e0e0e0;
    --adsp-form-border-style: solid;
    --adsp-form-text-color: #333333;
    --adsp-form-label-color: #555555;
    /* Fields */
    --adsp-field-bg-color: #f9f9f9;
    --adsp-field-text-color: #333333;
    --adsp-field-border-color: #cccccc;
    /* Button */
    --adsp-button-bg-color: #0073aa;
    --adsp-button-text-color: #ffffff;
    --adsp-button-hover-bg-color: #005a87;
    --adsp-button-hover-text-color: #ffffff;
    /* Stars & Tooltip */
    --adsp-star-filled-color: #ffb900;
    --adsp-star-empty-color: #dcdcdc;
    --adsp-tooltip-bg-color: #333333;
    --adsp-tooltip-text-color: #ffffff;
    /* Image Upload Area */
    --adsp-upload-bg-color: #f0f8ff;
    --adsp-upload-border-color: #cccccc;
    --adsp-upload-border-style: dashed;
    --adsp-upload-border-hover-color: #0073aa;
    /* Messages */
    --adsp-success-msg-bg-color: #d4edda;
    --adsp-success-msg-text-color: #155724;
    --adsp-error-msg-bg-color: #f8d7da;
    --adsp-error-msg-text-color: #721c24;
}

#adsp-testimonial-form-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: var(--adsp-form-bg-color);
    border: 1px var(--adsp-form-border-style) var(--adsp-form-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    color: var(--adsp-form-text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#adsp-testimonial-form-wrapper h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.adsp-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.adsp-form-field {
    flex: 1 1 100%;
}
@media (min-width: 600px) {
    .adsp-form-field {
        flex: 1 1 calc(50% - 10px);
    }
}

.adsp-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--adsp-form-label-color);
}

.adsp-form-field input[type="text"],
.adsp-form-field input[type="email"],
.adsp-form-field input[type="tel"],
.adsp-form-field select,
.adsp-form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--adsp-field-border-color);
    border-radius: 6px;
    background-color: var(--adsp-field-bg-color);
    color: var(--adsp-field-text-color);
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.adsp-form-field input:focus,
.adsp-form-field select:focus,
.adsp-form-field textarea:focus {
    outline: none;
    border-color: var(--adsp-button-bg-color);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Rating Stars */
/*.adsp-rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; position: relative; }*/
.adsp-rating-stars { display: flex; flex-direction: row-reverse; justify-content: center; position: relative; width: 100%; margin-top: 5%; background-color: rgba(200, 200, 200, 0.2); padding: 20px 0px; border-radius: 15px;}
.adsp-rating-stars input { display: none; }
.adsp-rating-stars label { font-size: 30px; color: var(--adsp-star-empty-color); cursor: pointer; transition: color 0.2s; margin: 0 2px !important; padding: 0; position: relative; }
.adsp-rating-stars label:hover,
.adsp-rating-stars label:hover ~ label,
.adsp-rating-stars input:checked ~ label { color: var(--adsp-star-filled-color); }
.adsp-rating-stars label .adsp-tooltip { visibility: hidden; width: 100px; background-color: var(--adsp-tooltip-bg-color); color: var(--adsp-tooltip-text-color); text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -50px; opacity: 0; transition: opacity 0.3s; font-size: 12px; }
.adsp-rating-stars label .adsp-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: var(--adsp-tooltip-bg-color) transparent transparent transparent; }
.adsp-rating-stars label:hover .adsp-tooltip { visibility: visible; opacity: 1; }

/* Image Upload */
.adsp-image-upload-wrapper {
    border-width: 2px;
    border-style: var(--adsp-upload-border-style);
    border-color: var(--adsp-upload-border-color);
    background-color: var(--adsp-upload-bg-color);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}
.adsp-image-upload-wrapper:hover {
    border-color: var(--adsp-upload-border-hover-color);
}
#adsp-image-preview { margin-top: 15px; }
#adsp-image-preview img { max-width: 100px; max-height: 100px; border-radius: 50%; border: 2px solid var(--adsp-field-border-color); }

/* Captcha and Submit */
.adsp-captcha-field { display: flex; align-items: center; gap: 10px; }
.adsp-captcha-field label { margin: 0; width: 45%; }
.adsp-captcha-field input { width: 60px; text-align: center; }

#adsp-submit-testimonial { width: 100%; padding: 15px; font-size: 16px; font-weight: 600; border: none; border-radius: 6px; background-color: var(--adsp-button-bg-color); color: var(--adsp-button-text-color); cursor: pointer; transition: background-color 0.3s, color 0.3s, transform 0.2s; }
#adsp-submit-testimonial:hover { background-color: var(--adsp-button-hover-bg-color); color: var(--adsp-button-hover-text-color); transform: translateY(-2px); }
#adsp-submit-testimonial:disabled { background-color: #cccccc; cursor: not-allowed; transform: none; }

/* Form Messages */
#adsp-form-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
    display: none;
    border: 1px solid transparent;
}
#adsp-form-message.success {
    background-color: var(--adsp-success-msg-bg-color);
    color: var(--adsp-success-msg-text-color);
    border-color: var(--adsp-success-msg-bg-color);
}
#adsp-form-message.error {
    background-color: var(--adsp-error-msg-bg-color);
    color: var(--adsp-error-msg-text-color);
    border-color: var(--adsp-error-msg-bg-color);
}

/* Spinner */
.adsp-form-spinner { display: none; margin: 0 10px; vertical-align: middle; }
