/* ============================================
   REVIEW FORM STYLES - Matching Website Theme
   ============================================ */

/* Review Form Section */
.review-form-section {
    padding: 120px 0;
    background: var(--pbmit-light-color);
}

/* Form Container */
.review-form {
    background: var(--pbmit-white-color);
    padding: 60px 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 50px rgba(50, 58, 67, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(205, 186, 109, 0.1);
}

.review-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pbmit-global-color);
}

/* Form Header - Using pbmit-heading-subheading pattern */
.form-header {
    position: relative;
    padding-bottom: 30px;
    margin-bottom: 40px;
    text-align: center;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--pbmit-global-color);
}

.form-title {
    font-family: var(--pbmit-heading-typography-font-family);
    font-size: 36px;
    font-weight: 700;
    color: var(--pbmit-heading-color);
    margin-bottom: 12px;
    line-height: 1.2;
}

.form-subtitle {
    font-family: var(--pbmit-body-typography-font-family);
    font-size: 16px;
    color: var(--pbmit-secondary-color);
    margin: 0;
    font-weight: 400;
}

/* Avatar Upload Section */
.avatar-upload-section {
    margin-bottom: 40px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

.avatar-upload-label {
    cursor: pointer;
    display: inline-block;
}

.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.avatar-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--pbmit-global-color);
    box-shadow: 0 10px 30px rgba(205, 186, 109, 0.25);
    transition: all 0.3s ease;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(205, 186, 109, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--pbmit-white-color);
}

.avatar-overlay i {
    font-size: 32px;
    margin-bottom: 8px;
}

.avatar-overlay span {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--pbmit-body-typography-font-family);
}

.avatar-wrapper:hover .avatar-image {
    transform: scale(1.05);
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.upload-hint {
    margin-top: 15px;
    font-size: 14px;
    color: var(--pbmit-secondary-color);
    font-family: var(--pbmit-body-typography-font-family);
}

.upload-hint i {
    color: var(--pbmit-global-color);
    margin-right: 8px;
}

/* Form Elements - Following pbmit form patterns */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-label {
    font-family: var(--pbmit-body-typography-font-family);
    font-size: 15px;
    font-weight: 600;
    color: var(--pbmit-heading-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-label i {
    color: var(--pbmit-global-color);
    font-size: 16px;
}

.custom-input,
.custom-textarea {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--pbmit-body-typography-font-family);
    font-size: 15px;
    color: var(--pbmit-secondary-color);
    background: var(--pbmit-white-color);
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 400;
}

.custom-input:focus,
.custom-textarea:focus {
    outline: none;
    border-color: var(--pbmit-global-color);
    box-shadow: 0 0 0 3px rgba(205, 186, 109, 0.1);
}

.custom-input::placeholder,
.custom-textarea::placeholder {
    color: #9ca3af;
    font-family: var(--pbmit-body-typography-font-family);
}

/* Star Rating - Styled to match theme */
.star-rating-wrapper {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    border: 2px solid #e5e7eb;
    text-align: center;
    transition: all 0.3s ease;
}

.star-rating-wrapper:hover {
    border-color: var(--pbmit-global-color);
    box-shadow: 0 8px 25px rgba(205, 186, 109, 0.15);
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: var(--pbmit-global-color);
    transform: scale(1.1);
}

.rating-text {
    font-family: var(--pbmit-body-typography-font-family);
    text-align: center;
    font-size: 15px;
    color: var(--pbmit-secondary-color);
    font-weight: 500;
    min-height: 22px;
}

/* Character Counter */
.char-counter {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: var(--pbmit-secondary-color);
    font-family: var(--pbmit-body-typography-font-family);
}

/* Submit Button - Following pbmit button patterns */
.btn-submit {
    width: 100%;
    padding: 18px 40px;
    font-family: var(--pbmit-btn-typography-font-family);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pbmit-white-color);
    background: var(--pbmit-global-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--pbmit-link-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(205, 186, 109, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 991px) {
    .review-form {
        padding: 50px 40px;
    }
    
    .form-title {
        font-size: 32px;
    }
    
    .avatar-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .avatar-image {
        width: 160px;
        height: 160px;
    }
    
    .star-rating label {
        font-size: 32px;
    }
    
    .review-form-section {
        padding: 100px 0;
    }
    
    /* Reorder columns for tablet */
    .review-form .row.align-items-start {
        flex-direction: column;
    }
    
    .review-form .col-lg-5 {
        order: -1;
        margin-bottom: 30px;
    }
    
    .avatar-upload-section {
        min-height: auto;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .review-form {
        padding: 40px 30px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .avatar-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .avatar-image {
        width: 140px;
        height: 140px;
    }
    
    .star-rating label {
        font-size: 30px;
    }
    
    .review-form-section {
        padding: 80px 0;
    }
    
    .avatar-upload-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Reorder columns for mobile - avatar on top */
    .review-form .row.align-items-start {
        flex-direction: column;
    }
    
    .review-form .col-lg-5 {
        order: -1;
        margin-bottom: 25px;
    }
    
    .avatar-upload-section {
        min-height: auto;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .review-form {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .avatar-image {
        width: 120px;
        height: 120px;
    }
    
    .star-rating label {
        font-size: 26px;
    }
    
    .star-rating-wrapper {
        padding: 20px;
    }
    
    .avatar-upload-section {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .upload-hint {
        font-size: 13px;
        margin-top: 10px;
    }
    
    .avatar-overlay i {
        font-size: 28px;
    }
    
    .avatar-overlay span {
        font-size: 12px;
    }
    
    /* Reorder columns for small mobile - avatar on top */
    .review-form .row.align-items-start {
        flex-direction: column;
    }
    
    .review-form .col-lg-5 {
        order: -1;
        margin-bottom: 20px;
    }
    
    .avatar-upload-section {
        min-height: auto;
        padding: 8px;
    }
}

@media (min-width: 1200px) {
    .avatar-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .avatar-image {
        width: 200px;
        height: 200px;
    }
    
    .avatar-upload-section {
        padding: 25px;
    }
}

/* Form Validation States */
.custom-input.error,
.custom-textarea.error {
    border-color: #dc3545;
}

.custom-input.success,
.custom-textarea.success {
    border-color: #10b981;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
    font-family: var(--pbmit-body-typography-font-family);
}

.error-message.show {
    display: block;
}

/* Loading State */
.btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sticky Avatar for Desktop */
@media (min-width: 992px) {
    .sticky-avatar {
        position: sticky;
        top: 120px;
    }
}

/* Custom Scrollbar for Textarea */
.custom-textarea::-webkit-scrollbar {
    width: 8px;
}

.custom-textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-textarea::-webkit-scrollbar-thumb {
    background: var(--pbmit-global-color);
    border-radius: 4px;
}

.custom-textarea::-webkit-scrollbar-thumb:hover {
    background: #b8a55c;
}

/* Fix Testimonial Images */
.pbmit-testimonialbox-style-4 .pbmit-box-img img,
.pbmit-testimonialbox-style-4 .pbmit-item-thumbnail-inner img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid var(--pbmit-global-color) !important;
}

/* Center Arabic Testimonial Content */
.pbmit-testimonialbox-style-4 .pbmit-box-content {
    text-align: center !important;
}

.pbmit-testimonialbox-style-4 .pbmit-box-star {
    justify-content: center !important;
    display: flex !important;
    margin-bottom: 15px !important;
}

.pbmit-testimonialbox-style-4 .pbmit-box-desc {
    text-align: center !important;
}

.pbmit-testimonialbox-style-4 .pbmit-testimonial-text {
    text-align: center !important;
}
