/* =========================================
   1. MAIN CONTAINER & RESET
   ========================================= */
.rm-wrapper {
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px; 
    margin: 40px auto;
    position: relative;
    scroll-margin-top: 100px; /* Fixes sticky header overlap on jump */
}
.rm-wrapper * { box-sizing: border-box; }

/* The main gray box for the Review Widget */
.rm-wrapper.well {
    background-color: #f9f9f9;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    padding: 40px 30px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
    overflow: hidden; 
}

.rm-wrapper .top_title {
    text-align: center;
    margin-bottom: 30px;
}

/* Admin Styles */
.toplevel_page_reputation-manager #wpcontent{ background: #2F3B4D; }
.toplevel_page_reputation-manager h1{ color:#FFF; }
.toplevel_page_reputation-manager .postbox, .toplevel_page_reputation-manager .card{ padding:15px; border-radius:15px; }

/* =========================================
   2. REVIEW WIDGET SLIDER STRUCTURE
   ========================================= */
.rm-carousel-wrapper { width: 100%; margin: 0 auto; display: block; }
.rm-carousel-wrapper .slick-list { width: 100%; overflow: hidden; margin: 0; padding: 0; }
.rm-carousel-wrapper .slick-track { display: flex; align-items: flex-start; }
.rm-slide { outline: none; padding: 10px 0; float: none; height: auto; min-height: 1px; }
.rm-content-inner { width: 100%; max-width: 500px; margin: 0 auto; text-align: center; }

/* =========================================
   3. REVIEW WIDGET: THUMBS & BUTTONS
   ========================================= */
.rm-thumbs-row { display: flex; justify-content: center; gap: 20px; width: 100%; }
.rm-thumb-col { width: 50%; display: flex; flex-direction: column; align-items: center; }
.rm-wrapper .thumbnail {
    display: block; text-decoration: none; color: #333; cursor: pointer;
    padding: 20px; border: 1px solid transparent; border-radius: 8px;
    transition: all 0.2s ease; width: 100%; text-align: center;
}
.rm-wrapper .thumbnail:hover { background-color: #fff; border-color: #ddd; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transform: translateY(-2px); }
.rm-wrapper .thumbnail span { display: block; margin-top: 15px; font-weight: 600; font-size: 18px; }

.rm-big-icon { font-size: 80px; display: block; margin: 0 auto; }
.rm-icon-up { color: #62a744; }
.rm-icon-down { color: #c60000; }

/* Platform Buttons Grid */
.review_buttons_container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%; margin: 0 auto; }
.rm-platform-btn {
    display: flex; align-items: center; width: 100%; padding: 12px 20px;
    border-radius: 15px; text-decoration: none !important; color: #fff !important;
    font-weight: bold; font-size: 15px; transition: opacity 0.3s ease, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); line-height: 1.2; background-color: #555;
}
.rm-platform-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.rm-btn-icon { font-size: 20px; margin-right: 12px; width: 24px; text-align: center; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.rm-btn-text { flex-grow: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Navigation */
.back_button_con { display: block; width: 100%; margin-top: 15px; text-align: center; }
.back_button { background: none; border: none; color: #cf4721; font-size: 16px; cursor: pointer; text-decoration: none; padding: 10px 0; display: inline-flex; align-items: center; }
.back_button i { margin-right: 5px; }

/* =========================================
   4. MODAL STYLING (Uses Variable)
   ========================================= */
.rm-modal.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 99999; display: none; overflow: hidden; background-color: rgba(0,0,0,0.6); }
.rm-modal .modal-dialog { position: relative; width: 90%; max-width: 600px; margin: 50px auto; background: #fff; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.rm-modal .modal-content { background-color: #fff; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }

.rm-modal .modal-header { 
    background-color:  #4285f4; /* Accent */
    padding: 20px; color: white; position: relative; flex-shrink: 0; 
}

.rm-modal .modal-header-content { display: flex; align-items: center; padding-right: 30px; }
.rm-modal .close { position: absolute; right: 15px; top: 15px; color: white; font-size: 24px; font-weight: bold; cursor: pointer; opacity: 0.8; background: none; border: none; z-index: 10; }
.rm-modal .modal-title { margin: 0; font-size: 20px; font-weight: 600; color: white; }
.rm-modal .place-description { font-size: 14px; opacity: 0.9; margin-top: 5px; }
.rm-modal .modal-body { padding: 20px; overflow-y: auto; }
.rm-modal .gform_wrapper { margin: 0; }
.rm-modal .gfield_label { display: none !important; }

.rm-modal input[type="submit"] { 
    background: var(--rm-primary-color, #4285f4); /* Accent */
    color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; float: right; 
}

/* =========================================
   5. TESTIMONIALS (GRID & SLIDER)
   ========================================= */
/* Grid Layout */
.rm-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }

/* Card Style */
.rm-testi-card {
    background: #fff; border-radius: 8px; padding: 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); border: 1px solid #eee;
    text-align: center; height: 100%; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.3s ease;
}
.rm-testi-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

/* Elements */
.rm-testi-stars { margin-bottom: 15px; font-size: 18px; }
.rm-testi-stars .fas { color: #ddd; }
.rm-testi-stars .fas.filled { color: #f4b400; }

/* Content */
.rm-testi-content { font-size: 15px; line-height: 1.6; color: #555; margin-bottom: 20px; flex-grow: 1; font-style: normal; font-weight: 500; }

.rm-testi-meta h4.rm-testi-name { margin: 0; font-size: 18px; font-weight: 700; color: #333; }
.rm-testi-role { font-size: 13px; color: #777; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.rm-testi-badge, a.rm-testi-badge { 
    display: inline-block; color: #fff !important; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; margin-top: 5px; 
    text-decoration: none !important; transition: opacity 0.2s; line-height: 1;
}
a.rm-testi-badge:hover { opacity: 0.85; }
.rm-testi-badge i { margin-right: 5px; }

/* Slider Fixes */
.rm-testi-slider { position: relative; padding: 0 60px; margin-bottom: 40px; margin-top: -10px; }
.rm-testi-slider .slick-list { overflow: hidden; padding-top: 10px; padding-bottom: 10px; }
.rm-testi-slider .rm-testi-item { padding: 20px 15px; height: 100%; }
.rm-testi-slider .slick-track { display: flex !important; align-items: stretch; }
.rm-testi-slider .slick-slide { height: auto; display: flex; flex-direction: column; justify-content: center; margin: 0 15px; }

/* Arrows (Uses Variable) */
.rm-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: #fff; border: 1px solid #ddd; color: #333;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; z-index: 20; font-size: 16px;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.rm-arrow:hover { 
    background: var(--rm-primary-color, #4285f4); /* Accent */
    color: #fff; 
    border-color: var(--rm-primary-color, #4285f4); /* Accent */
}
.slick-prev.rm-arrow { left: 0; }
.slick-next.rm-arrow { right: 0; }

/* Pagination (Uses Variable) */
.rm-pagination { text-align: center; margin-top: 30px; display: block; clear: both; }
.rm-pagination .page-numbers {
    display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid #ddd;
    border-radius: 4px; text-decoration: none; color: #444; background: #fff; transition: all 0.2s;
}
.rm-pagination .page-numbers.current, .rm-pagination .page-numbers:hover { 
    background: var(--rm-primary-color, #4285f4); /* Accent */
    color: #fff; 
    border-color: var(--rm-primary-color, #4285f4); /* Accent */
}

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 992px) { .rm-testi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .rm-thumbs-row { flex-direction: column; }
    .rm-thumb-col { width: 100%; margin-bottom: 10px; }
    .review_buttons_container { grid-template-columns: 1fr; }
    .back_button_con { text-align: center; }
    .rm-big-icon { font-size: 60px; }
    .rm-modal .modal-dialog { margin: 20px auto; width: 95%; }
    .rm-testi-grid { grid-template-columns: 1fr; }
    .rm-testi-slider { padding: 0 40px; margin-top: 0; }
    .rm-testi-slider .rm-testi-item { padding: 15px; }
    .slick-prev.rm-arrow { left: 0; }
    .slick-next.rm-arrow { right: 0; }
}

/* =========================================
   7. ELEMENTOR FONT FIX
   ========================================= */
.rm-wrapper .fas, .rm-wrapper .fa-solid, 
.rm-wrapper .fa-chevron-left, .rm-wrapper .fa-thumbs-up, .rm-wrapper .fa-thumbs-down {
    font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important;
}
.rm-wrapper .fab, .rm-wrapper .fa-brands {
    font-family: "Font Awesome 6 Brands" !important; font-weight: 400 !important;
}

/* =========================================
   8. ADMIN TOGGLE SWITCH
   ========================================= */
.rm-switch { position: relative; display: inline-block; width: 50px; height: 24px; vertical-align: middle; }
.rm-switch input { opacity: 0; width: 0; height: 0; }
.rm-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.rm-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .rm-slider { background-color: #2196F3; }
input:focus + .rm-slider { box-shadow: 0 0 1px #2196F3; }
input:checked + .rm-slider:before { transform: translateX(26px); }