/**
 * Revenue Recovery LLC - Testimonials & Review System Styles
 * Matches website palette: Charcoal (#2F2F2F), Warm Tan/Brown (#C8B08A),
 * Warm Hover (#B8B1A9), Light Warm Cream (#F8F6F3), and Deep Navy (#1B365D)
 */

:root {
    --rr-primary: #2F2F2F;
    --rr-primary-hover: #B8B1A9;
    --rr-blue: #1B365D;
    --rr-blue-hover: #142742;
    --rr-brown-accent: #C8B08A;
    --rr-brown-accent-hover: #B89E76;
    --rr-brown-border: #E5E0DA;
    --rr-brown-border-focus: #C8B08A;
    --rr-bg-warm: #F8F6F3;
    --rr-dark: #2F2F2F;
    --rr-text: #2F2F2F;
    --rr-text-muted: #686560;
    --rr-card-bg: #FFFFFF;
    --rr-star-gold: #C8B08A;
    --rr-radius-md: 8px;
    --rr-radius-lg: 12px;
    --rr-shadow-subtle: 0 4px 12px rgba(47, 47, 47, 0.05);
    --rr-shadow-hover: 0 14px 28px rgba(47, 47, 47, 0.09);
}

/* ==========================================================================
   1. Showcase & Slider Section
   ========================================================================== */
.rr-testimonials-showcase-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 10px 15px 30px;
    font-family: inherit;
    box-sizing: border-box;
}

.rr-testimonials-showcase-container * {
    box-sizing: border-box;
}

.rr-slider-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 10px 0 25px 0;
}

.rr-testimonials-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    gap: 24px;
}

.rr-testimonial-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 300px;
    display: flex;
}

@media (max-width: 991px) {
    .rr-testimonial-card {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 640px) {
    .rr-testimonial-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

.rr-card-inner {
    background: var(--rr-card-bg);
    border: 1px solid var(--rr-brown-border);
    border-radius: var(--rr-radius-lg);
    padding: 32px 28px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--rr-shadow-subtle);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rr-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: var(--rr-shadow-hover);
    border-color: var(--rr-brown-accent);
}

.rr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.rr-stars {
    color: var(--rr-star-gold);
    font-size: 20px;
    letter-spacing: 2px;
    line-height: 1;
}

.rr-star.empty {
    color: #E5E0DA;
}

.rr-quote-icon {
    font-size: 34px;
    line-height: 1;
    color: #D4D1C7;
    font-family: Georgia, serif;
    font-weight: bold;
    user-select: none;
}

.rr-card-body {
    flex-grow: 1;
    margin-bottom: 24px;
}

.rr-quote-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--rr-text);
    margin: 0;
    font-style: italic;
}

.rr-card-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid #F2EFEA;
}

.rr-author-avatar-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
}

.rr-author-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rr-brown-border);
    display: block;
}

/* Fallback Initials Avatar (Deep Navy with warm brownish border) */
.rr-author-avatar-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B365D 0%, #0F223D 100%);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    border: 2px solid var(--rr-brown-accent);
    box-shadow: 0 4px 10px rgba(27, 54, 93, 0.2);
    user-select: none;
}

.rr-author-info {
    overflow: hidden;
}

.rr-author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--rr-dark);
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rr-author-practice {
    font-size: 13px;
    color: var(--rr-text-muted);
    margin: 0;
    line-height: 1.35;
}

.rr-author-separator {
    margin: 0 4px;
    color: #B8B1A9;
}

/* Slider Controls */
.rr-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.rr-slider-prev,
.rr-slider-next {
    background: #FFFFFF;
    border: 1px solid var(--rr-brown-border);
    color: var(--rr-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(47,47,47,0.05);
}

.rr-slider-prev:hover,
.rr-slider-next:hover {
    background: var(--rr-primary);
    color: #FFFFFF;
    border-color: var(--rr-primary);
}

.rr-slider-dots {
    display: flex;
    gap: 8px;
}

.rr-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D4D1C7;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    padding: 0;
}

.rr-slider-dot.active {
    width: 24px;
    border-radius: 6px;
    background: var(--rr-brown-accent);
}

/* Action Bar below testimonials */
.rr-action-bar {
    margin-top: 40px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

.rr-cta-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #2F2F2F 0%, #1e1e1e 100%);
    color: #FFFFFF !important;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 8px;
    border: 2px solid var(--rr-brown-accent);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(47, 47, 47, 0.18);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.rr-cta-review-btn:hover {
    background: linear-gradient(135deg, #1B365D 0%, #142742 100%);
    border-color: #D8C5A4;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(27, 54, 93, 0.28);
    color: #FFFFFF !important;
}

.rr-cta-icon {
    color: var(--rr-brown-accent);
    font-size: 18px;
    line-height: 1;
}

.rr-cta-text {
    color: #FFFFFF !important;
    line-height: 1.3;
}

.rr-cta-arrow {
    color: var(--rr-brown-accent);
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.25s ease;
}

.rr-cta-review-btn:hover .rr-cta-arrow {
    transform: translateX(5px);
    color: #FFFFFF;
}

@media (max-width: 640px) {
    .rr-action-bar {
        margin-top: 30px;
    }
    .rr-cta-review-btn {
        width: 100%;
        max-width: 100%;
        padding: 15px 20px;
        font-size: 14.5px;
        gap: 8px;
    }
}

.rr-page-link {
    color: var(--rr-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.rr-page-link:hover {
    color: var(--rr-brown-accent);
    text-decoration: underline;
}

.rr-no-testimonials {
    text-align: center;
    padding: 40px 20px;
    background: var(--rr-bg-warm);
    border: 1px solid var(--rr-brown-border);
    border-radius: var(--rr-radius-md);
    color: var(--rr-text-muted);
}

/* ==========================================================================
   2. Submission Form Styles
   ========================================================================== */
.rr-review-form-wrapper {
    background: #FFFFFF;
    border-radius: var(--rr-radius-lg);
    box-shadow: 0 10px 30px rgba(47, 47, 47, 0.05);
    border: 1px solid var(--rr-brown-border);
    padding: 36px;
    max-width: 720px;
    margin: 0 auto;
}

.rr-form-modal-inner {
    border: none;
    box-shadow: none;
    padding: 0;
}

.rr-form-header {
    text-align: center;
    margin-bottom: 28px;
}

.rr-form-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rr-dark);
    margin: 0 0 10px 0;
}

.rr-form-header p {
    color: var(--rr-text-muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

.rr-form-group {
    margin-bottom: 20px;
}

.rr-form-row {
    display: flex;
    gap: 18px;
}

.rr-col-half {
    flex: 1;
}

@media (max-width: 600px) {
    .rr-form-row {
        flex-direction: column;
        gap: 0;
    }
}

.rr-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--rr-dark);
    margin-bottom: 7px;
}

.rr-required {
    color: #C90A0A;
}

.rr-input,
.rr-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rr-brown-border);
    border-radius: var(--rr-radius-md);
    font-size: 15px;
    color: var(--rr-text);
    background: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.rr-input:focus,
.rr-textarea:focus {
    border-color: var(--rr-brown-border-focus);
    box-shadow: 0 0 0 3px rgba(200, 176, 138, 0.25);
    outline: none;
}

.rr-textarea {
    resize: vertical;
    min-height: 100px;
}

.rr-help-text {
    font-size: 12px;
    color: var(--rr-text-muted);
    display: block;
    margin-top: 5px;
}

/* Star Rating Interactive Input */
.rr-star-rating-select {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.rr-stars-row {
    display: inline-flex;
    cursor: pointer;
}

.rr-star-item {
    font-size: 30px;
    color: #D4D1C7;
    transition: color 0.15s ease, transform 0.15s ease;
    padding: 0 2px;
    user-select: none;
}

.rr-star-item:hover {
    transform: scale(1.15);
}

.rr-star-item.active {
    color: var(--rr-star-gold);
}

.rr-rating-text-feedback {
    font-size: 14px;
    font-weight: 600;
    color: var(--rr-dark);
}

/* File Upload Dropzone */
.rr-file-dropzone {
    border: 2px dashed #D4D1C7;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
    background: var(--rr-bg-warm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.rr-file-dropzone:hover,
.rr-file-dropzone.dragover {
    border-color: var(--rr-brown-accent);
    background: #FAF8F5;
}

.rr-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.rr-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.rr-dropzone-icon {
    font-size: 26px;
}

.rr-dropzone-prompt {
    font-size: 14px;
    font-weight: 600;
    color: var(--rr-dark);
}

.rr-dropzone-subtext {
    font-size: 12px;
    color: var(--rr-text-muted);
}

.rr-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: relative;
    z-index: 3;
}

.rr-upload-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rr-brown-accent);
}

.rr-remove-image-btn {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.rr-remove-image-btn:hover {
    background: #FECACA;
}

/* Submit & Feedback */
.rr-form-footer {
    margin-top: 24px;
    text-align: center;
}

.rr-submit-btn {
    background: var(--rr-primary);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: var(--rr-radius-md);
    border: none;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(47, 47, 47, 0.15);
}

.rr-submit-btn:hover {
    background: var(--rr-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(47, 47, 47, 0.25);
}

.rr-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.rr-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: rrSpin 0.7s infinite linear;
}

@keyframes rrSpin {
    to { transform: rotate(360deg); }
}

.rr-approval-disclaimer {
    font-size: 12px;
    color: var(--rr-text-muted);
    margin-top: 14px;
    margin-bottom: 0;
}

.rr-feedback-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.rr-feedback-message.success {
    background: #F4F9F4;
    border: 1px solid #A3D9A5;
    color: #1B5E20;
}

.rr-feedback-message.error {
    background: #FDF2F2;
    border: 1px solid #F8B4B4;
    color: #9B1C1C;
}

/* ==========================================================================
   3. Modal Popup Styles
   ========================================================================== */
.rr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 47, 47, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    box-sizing: border-box;
}

.rr-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.rr-modal-container {
    background: #FFFFFF;
    border-radius: var(--rr-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(47, 47, 47, 0.25);
    border: 1px solid var(--rr-brown-border);
    max-width: 660px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 32px 30px 32px;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .rr-modal-container {
        padding: 28px 20px 24px 20px;
        max-height: 95vh;
    }
}

.rr-modal-backdrop.open .rr-modal-container {
    transform: translateY(0) scale(1);
}

.rr-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: var(--rr-bg-warm);
    border: 1px solid var(--rr-brown-border);
    font-size: 24px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--rr-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.rr-modal-close:hover {
    background: var(--rr-brown-border);
    color: var(--rr-dark);
    transform: rotate(90deg);
}

body.rr-modal-open {
    overflow: hidden;
}
