/*
 * Uplyft Reviews — Frontend Styles
 * Powered by uplyftio.com — do not remove
 * v1.0.5 — clean rewrite, no conflicting rules
 */

/* ============================================================
   BASE
   ============================================================ */
.uplyft-reviews-wrapper {
    font-family: inherit;
    box-sizing: border-box;
}
.uplyft-reviews-wrapper *,
.uplyft-reviews-wrapper *::before,
.uplyft-reviews-wrapper *::after {
    box-sizing: border-box;
}

/* ============================================================
   GRID
   ============================================================ */
.uplyft-reviews-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}
.uplyft-layout-grid.uplyft-cols-1 { grid-template-columns: 1fr; }
.uplyft-layout-grid.uplyft-cols-2 { grid-template-columns: repeat(2, 1fr); }
.uplyft-layout-grid.uplyft-cols-3 { grid-template-columns: repeat(3, 1fr); }
.uplyft-layout-grid.uplyft-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   SLIDER / CAROUSEL
   ============================================================ */
.uplyft-layout-slider,
.uplyft-layout-carousel {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* ============================================================
   REVIEW CARD
   ============================================================ */
.uplyft-review-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.uplyft-review-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.uplyft-stars { font-size: 18px; line-height: 1; letter-spacing: 1px; margin-bottom: 4px; }
.uplyft-star.filled { color: #f0a500; }
.uplyft-star.empty  { color: #cbd5e0; }
.uplyft-reviewer-name  { font-size: 15px; font-weight: 600; color: #1a202c; margin: 0; }
.uplyft-reviewer-desig { font-size: 13px; color: #64748b; margin: 0; }
.uplyft-review-meta    { font-size: 12px; color: #94a3b8; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.uplyft-meta-sep       { color: #cbd5e0; }
.uplyft-review-divider { border: none; border-top: 1px solid #e2e8f0; margin: 6px 0; }
.uplyft-review-body    { font-size: 14px; line-height: 1.65; color: #374151; margin: 0; flex: 1; }
.uplyft-no-reviews     { text-align: center; color: #94a3b8; padding: 40px 0; font-size: 14px; }

/* ============================================================
   SLIDER NAV
   ============================================================ */
.uplyft-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.uplyft-nav-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 36px; height: 36px;
    font-size: 22px; line-height: 1;
    cursor: pointer; color: #374151;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.uplyft-nav-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.uplyft-dots { display: flex; gap: 6px; align-items: center; }
.uplyft-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #cbd5e0; cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    touch-action: manipulation;
}
.uplyft-dot.active { background: #374151; transform: scale(1.25); }

/* ============================================================
   FORM WRAPPER
   ============================================================ */
.uplyft-review-form-wrap {
    margin-top: 48px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
}
.uplyft-form-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a202c;
}

/* ============================================================
   STAR SELECTOR
   ============================================================ */
.uplyft-form-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    font-size: 18px;
    flex-wrap: nowrap;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}
.uplyft-form-star {
    cursor: pointer;
    color: #cbd5e0;
    transition: color 0.15s, transform 0.1s;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex: 1;
    max-width: 52px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}
.uplyft-form-star:hover,
.uplyft-form-star.hover,
.uplyft-form-star.selected {
    color: #f0a500;
    transform: scale(1.15);
}

/* ============================================================
   FORM LAYOUT
   ============================================================ */
.uplyft-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.uplyft-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.uplyft-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
.uplyft-required { color: #e53e3e; }

/* ============================================================
   INPUTS & TEXTAREA
   All pointer-events, user-select and touch rules in ONE place.
   ============================================================ */
.uplyft-form-field input[type="text"],
.uplyft-form-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px; /* 16px prevents iOS auto-zoom */
    font-family: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #ffffff;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    /* Explicitly enable interaction on ALL devices */
    pointer-events: auto;
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 1;
}
.uplyft-form-field input[type="text"]:focus,
.uplyft-form-field textarea:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148,163,184,0.15);
}
.uplyft-form-field input[type="text"]::placeholder,
.uplyft-form-field textarea::placeholder { color: #94a3b8; }
.uplyft-form-field textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   LOCATION FIELD
   Locked visually via class — NO readonly attribute used anywhere.
   pointer-events: none only on the input itself, never on parent.
   ============================================================ */
.uplyft-field-location.uplyft-location-auto,
.uplyft-field-location.uplyft-location-locked {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    cursor: default;
    /* Lock just this input — does NOT affect siblings */
    pointer-events: none;
}

/* When detection failed — fully editable */
.uplyft-field-location:not(.uplyft-location-auto):not(.uplyft-location-locked) {
    pointer-events: auto;
    background: #ffffff;
    color: #1a202c;
}

.uplyft-auto-badge {
    font-size: 11px;
    font-weight: 500;
    background: #dcfce7;
    color: #166534;
    border-radius: 20px;
    padding: 2px 8px;
}

/* ============================================================
   CHAR COUNT + MESSAGES
   ============================================================ */
.uplyft-char-count { font-size: 11px; color: #94a3b8; text-align: right; margin-top: -10px; }
.uplyft-form-message {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
    margin-bottom: 16px;
}
.uplyft-form-message.success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.uplyft-form-message.error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.uplyft-submit-btn {
    width: 100%;
    padding: 13px 20px;
    background: #1a202c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s, transform 0.1s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.uplyft-submit-btn:hover   { opacity: 0.88; }
.uplyft-submit-btn:active  { transform: scale(0.98); }
.uplyft-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   NOTES + BRAND
   ============================================================ */
.uplyft-form-note  { font-size: 12px; color: #94a3b8; text-align: center; margin-top: 10px; }
.uplyft-brand-note { font-size: 11px; color: #cbd5e0; text-align: center; margin-top: 6px; }
.uplyft-brand-note a { color: #94a3b8; text-decoration: none; }
.uplyft-brand-note a:hover { text-decoration: underline; }

/* ============================================================
   LICENCE NOTICE
   ============================================================ */
.uplyft-license-notice {
    padding: 16px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
}
.uplyft-license-notice a { color: #b45309; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media ( max-width: 900px ) {
    .uplyft-layout-grid.uplyft-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .uplyft-layout-grid.uplyft-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ============================================================ */
@media ( max-width: 600px ) {
    .uplyft-layout-grid.uplyft-cols-2,
    .uplyft-layout-grid.uplyft-cols-3,
    .uplyft-layout-grid.uplyft-cols-4 { grid-template-columns: 1fr; }
    .uplyft-form-row { grid-template-columns: 1fr; }
    .uplyft-review-form-wrap { padding: 20px 16px; margin-top: 32px; }
    .uplyft-form-title { font-size: 17px; }
    .uplyft-form-stars { gap: 2px; max-width: 240px; }
    .uplyft-form-star  { padding: 8px 4px; font-size: 22px; max-width: 46px; }
    .uplyft-nav-btn { width: 40px; height: 40px; }
    .uplyft-submit-btn { font-size: 16px; padding: 14px; }
}

/* Char count — outside textarea field so it never overlaps */
.uplyft-char-count-wrap {
    text-align: right;
    margin-top: -12px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    pointer-events: none;
}
.uplyft-char-count {
    font-size: 11px;
    color: #94a3b8;
    pointer-events: none;
}

/* Textarea — absolute guarantee it is always clickable */
textarea.uplyft-field-review {
    display: block !important;
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    touch-action: manipulation !important;
    position: relative !important;
    z-index: 10 !important;
    cursor: text !important;
}
