/* Advanced Reviews Pro - Public Styles
   All selectors prefixed with .arp- to prevent theme/plugin conflicts
   CSS variables for easy customization
*/

/* ========== ROOT VARIABLES ========== */
.arp-wrapper {
    --arp-primary: #f59e0b;
    --arp-star: #f59e0b;
    --arp-card-bg: #ffffff;
    --arp-radius: 12px;
    --arp-shadow: 0 4px 24px rgba(0,0,0,0.1);
    --arp-font-size: 15px;
    --arp-text: #1f2937;
    --arp-text-light: #6b7280;
    --arp-border: #e5e7eb;
    --arp-input-bg: #f9fafb;
    --arp-star-empty: #d1d5db;
    --arp-transition: 0.3s ease;
    --arp-btn-text: #fff;
    font-family: inherit;
    color: var(--arp-text);
    font-size: var(--arp-font-size);
    box-sizing: border-box;
    line-height: 1.6;
}

.arp-wrapper *, .arp-wrapper *::before, .arp-wrapper *::after {
    box-sizing: border-box;
}

/* ========== HEADER ========== */
.arp-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 36px;
}
.arp-header-text { flex: 1; min-width: 200px; }
.arp-section-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--arp-text);
    line-height: 1.2;
}
.arp-section-subtitle {
    font-size: 16px;
    color: var(--arp-text-light);
    margin: 0;
}

/* ========== OVERALL RATING ========== */
.arp-overall-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--arp-card-bg);
    border: 1px solid var(--arp-border);
    border-radius: var(--arp-radius);
    padding: 20px 24px;
    box-shadow: var(--arp-shadow);
    flex-shrink: 0;
}
.arp-big-score {
    font-size: 52px;
    font-weight: 900;
    color: var(--arp-primary);
    line-height: 1;
}
.arp-rating-details { display: flex; flex-direction: column; gap: 6px; }
.arp-stars-display .arp-star-full { color: var(--arp-star); }
.arp-stars-display .arp-star-empty { color: var(--arp-star-empty); }
.arp-total-count { font-size: 13px; color: var(--arp-text-light); }
.arp-breakdown { display: flex; flex-direction: column; gap: 3px; }
.arp-breakdown-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.arp-breakdown-label { width: 28px; color: var(--arp-text-light); text-align: right; }
.arp-breakdown-bar-wrap { width: 80px; height: 6px; background: var(--arp-border); border-radius: 3px; overflow: hidden; }
.arp-breakdown-bar { height: 100%; background: var(--arp-star); border-radius: 3px; transition: width 1s ease; }
.arp-breakdown-count { color: var(--arp-text-light); min-width: 16px; }

/* ========== STARS ========== */
.arp-stars { display: inline-flex; gap: 1px; font-size: 18px; line-height: 1; }
.arp-star { display: inline-block; }
.arp-star-full  { color: var(--arp-star); }
.arp-star-half  { color: var(--arp-star); position: relative; }
.arp-star-empty { color: var(--arp-star-empty); }

/* ========== CARDS ========== */
.arp-card {
    background: var(--arp-card-bg);
    border-radius: var(--arp-radius);
    box-shadow: var(--arp-shadow);
    border: 1px solid var(--arp-border);
    overflow: hidden;
    transition: transform var(--arp-transition), box-shadow var(--arp-transition);
}
.arp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.arp-card-image { position: relative; }
.arp-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.arp-verified-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.arp-card-body { padding: 20px; }
.arp-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.arp-featured-badge {
    background: linear-gradient(135deg, var(--arp-primary), #e67e22);
    color: #fff;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}
.arp-review-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--arp-text); }
.arp-review-content { font-size: var(--arp-font-size); color: var(--arp-text); margin: 0 0 16px; line-height: 1.7; }
.arp-card-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.arp-reviewer-info { display: flex; align-items: center; gap: 12px; }
.arp-reviewer-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--arp-primary), #e67e22);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.arp-reviewer-details { display: flex; flex-direction: column; gap: 2px; }
.arp-reviewer-name { font-size: 14px; font-weight: 700; color: var(--arp-text); }
.arp-reviewer-region, .arp-reviewer-product { font-size: 12px; color: var(--arp-text-light); }
.arp-card-meta { text-align: right; }
.arp-review-date { font-size: 12px; color: var(--arp-text-light); display: block; }
.arp-verified-text { font-size: 12px; color: #10b981; font-weight: 600; }

/* ========== LIST STYLE ========== */
.arp-card-list { display: flex; gap: 0; }
.arp-card-list .arp-card-image { width: 180px; flex-shrink: 0; }
.arp-card-list .arp-card-image img { height: 100%; }

/* ========== CAROUSEL ========== */
.arp-carousel-wrap { position: relative; overflow: hidden; }
.arp-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.arp-slide { flex: 0 0 calc(33.333% - 14px); min-width: 0; }
.arp-prev, .arp-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--arp-card-bg);
    border: 2px solid var(--arp-border);
    color: var(--arp-text);
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all var(--arp-transition);
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.arp-prev { left: -22px; }
.arp-next { right: -22px; }
.arp-prev:hover, .arp-next:hover {
    background: var(--arp-primary);
    color: #fff;
    border-color: var(--arp-primary);
}
.arp-dots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 20px;
}
.arp-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--arp-border);
    border: none;
    cursor: pointer;
    transition: all var(--arp-transition);
    padding: 0;
}
.arp-dot.active { background: var(--arp-primary); width: 24px; border-radius: 5px; }

/* ========== GRID ========== */
.arp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ========== LIST ========== */
.arp-list { display: flex; flex-direction: column; gap: 20px; }
.arp-list .arp-card { display: flex; flex-direction: row; }
.arp-list .arp-card-image { width: 160px; flex-shrink: 0; }
.arp-list .arp-card-image img { height: 100%; width: 100%; object-fit: cover; }
.arp-list .arp-card-body { flex: 1; }

/* ========== MASONRY ========== */
.arp-masonry {
    columns: 3;
    column-gap: 20px;
}
.arp-masonry .arp-card {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* ========== ANIMATE ========== */
.arp-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.arp-animate.arp-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== NO REVIEWS ========== */
.arp-no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--arp-text-light);
    font-size: 16px;
    background: var(--arp-card-bg);
    border-radius: var(--arp-radius);
    border: 2px dashed var(--arp-border);
}

/* ========== REVIEW FORM ========== */
.arp-form-section { margin-top: 40px; }
.arp-write-review-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--arp-primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--arp-transition);
    font-family: inherit;
}
.arp-write-review-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.arp-form-wrap {
    background: var(--arp-card-bg);
    border: 1px solid var(--arp-border);
    border-radius: var(--arp-radius);
    padding: 32px;
    margin-top: 20px;
    box-shadow: var(--arp-shadow);
}
.arp-form-wrap h3 { margin: 0 0 24px; font-size: 20px; font-weight: 800; color: var(--arp-text); }
.arp-form-group { margin-bottom: 18px; }
.arp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.arp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--arp-text);
    margin-bottom: 6px;
}
.arp-required { color: #ef4444; }
.arp-form-group input,
.arp-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--arp-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--arp-text);
    background: var(--arp-input-bg);
    transition: border-color var(--arp-transition);
    font-family: inherit;
    line-height: 1.5;
}
.arp-form-group input:focus,
.arp-form-group textarea:focus {
    outline: none;
    border-color: var(--arp-primary);
    background: var(--arp-card-bg);
}
.arp-form-group textarea { resize: vertical; min-height: 100px; }

/* Star Picker */
.arp-rating-group { }
.arp-star-picker {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}
.arp-star-picker input { display: none; }
.arp-star-picker label {
    font-size: 36px;
    color: var(--arp-star-empty);
    cursor: pointer;
    transition: color var(--arp-transition);
    margin: 0;
    line-height: 1;
}
.arp-star-picker label:hover,
.arp-star-picker label:hover ~ label,
.arp-star-picker input:checked ~ label {
    color: var(--arp-star);
}

/* File Upload */
.arp-file-upload { display: flex; flex-direction: column; gap: 10px; }
.arp-file-upload input[type="file"] {
    padding: 8px;
    background: var(--arp-input-bg);
    cursor: pointer;
}
.arp-upload-hint { font-size: 12px; color: var(--arp-text-light); }
.arp-upload-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--arp-border);
    object-fit: cover;
}

/* Submit Button */
.arp-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--arp-primary);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--arp-transition);
    font-family: inherit;
}
.arp-submit-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.arp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.arp-approval-note { font-size: 13px; color: var(--arp-text-light); margin-top: 12px; }

/* Form Notice */
.arp-form-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
.arp-notice-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.arp-notice-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .arp-slide { flex: 0 0 calc(50% - 10px); }
    .arp-masonry { columns: 2; }
    .arp-overall-rating { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .arp-slide { flex: 0 0 100%; }
    .arp-prev { left: 0; }
    .arp-next { right: 0; }
    .arp-form-row { grid-template-columns: 1fr; }
    .arp-masonry { columns: 1; }
    .arp-grid { grid-template-columns: 1fr; }
    .arp-header { flex-direction: column; }
    .arp-big-score { font-size: 40px; }
    .arp-list .arp-card { flex-direction: column; }
    .arp-list .arp-card-image { width: 100%; }
    .arp-list .arp-card-image img { height: 180px; }
    .arp-form-wrap { padding: 20px 16px; }
}
