/* ==========================================================================
   GoSy Reviews & Ratings — Frontend Styles
   ========================================================================== */

/* ---------- Rating Card (event detail) ---------- */

.gosy-rating-card {
    background: #fff;
    border-radius: 12px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.gosy-rating-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.gosy-rating-card__subtitle {
    font-size: 14px;
    color: #757575;
    margin: 0 0 16px;
}

.gosy-rating-card__points {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    margin: 12px 0 0;
    animation: gosy-fade-in 0.4s ease;
}

.gosy-rating-card__feedback {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

/* ---------- Stars ---------- */

.gosy-rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px;
}

.gosy-star {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
    line-height: 1;
    display: inline-flex;
}

.gosy-star:hover {
    transform: scale(1.2);
}

.gosy-star svg {
    transition: fill 0.15s ease;
}

.gosy-star--filled svg,
.gosy-star.active svg {
    fill: #FFC107;
}

/* Static stars (finalized) */
.gosy-rating-stars--static .gosy-star {
    cursor: default;
    pointer-events: none;
}

/* Upgrade pulse animation */
@keyframes gosy-star-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        transform: scale(1.18);
        filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.6));
    }
}

/* Stars 4-5 on upgrade card: pulse animation */
.gosy-star-upgradeable {
    animation: gosy-star-pulse 2s ease-in-out infinite;
}

.gosy-star-upgradeable:hover {
    animation: none;
    transform: scale(1.25);
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.8));
}

/* Stars 2-3 on upgrade card: clickable but without pulse */
.gosy-star-upgradeable-low {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.gosy-star-upgradeable-low:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.5));
}

/* ---------- Inline Stars (shortcodes) ---------- */

.gosy-stars-inline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.gosy-stars-inline svg {
    vertical-align: middle;
}

.gosy-rating-avg {
    font-size: 14px;
    color: #555;
    margin-left: 6px;
}

/* ---------- Top Rated Events ---------- */

.gosy-top-rated__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gosy-top-rated__item:last-child {
    border-bottom: none;
}

.gosy-top-rated__item a {
    font-weight: 600;
    color: var(--theme-palette-color-1, #333);
    text-decoration: none;
}

.gosy-top-rated__item a:hover {
    color: var(--theme-palette-color-2, #555);
}

/* ---------- Reviews List ---------- */

.gosy-reviews-list__items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gosy-review-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.gosy-review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gosy-review-item__avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.gosy-review-item__content {
    flex: 1;
    min-width: 0;
}

.gosy-review-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.gosy-review-item__name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.gosy-review-item__stars {
    display: inline-flex;
    gap: 1px;
}

.gosy-review-item__text {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin: 0 0 6px;
    word-wrap: break-word;
}

.gosy-review-item__date {
    font-size: 12px;
    color: #999;
}

/* ---------- Review Form ---------- */

.gosy-review-form-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin: 20px 0;
}

.gosy-review-form__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.gosy-review-form__edit-notice {
    font-size: 13px;
    color: #757575;
    margin: 0 0 16px;
}

.gosy-review-form__rating {
    margin-bottom: 16px;
}

.gosy-review-form__rating label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.gosy-review-stars {
    justify-content: flex-start;
}

.gosy-review-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.gosy-review-textarea:focus {
    border-color: var(--theme-palette-color-1, #0073aa);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.gosy-char-counter {
    font-size: 12px;
    color: #999;
    margin: 4px 0 12px;
    text-align: right;
}

.gosy-char-counter.gosy-char-counter--valid {
    color: #4CAF50;
}

/* ---------- Buttons ---------- */

.gosy-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.gosy-btn--primary {
    background: var(--theme-palette-color-1, #0073aa);
    color: #fff;
}

.gosy-btn--primary:hover {
    background: var(--theme-palette-color-2, #005a87);
    transform: translateY(-1px);
}

.gosy-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.gosy-btn--secondary {
    background: #f0f0f0;
    color: #333;
}

.gosy-btn--secondary:hover {
    background: #e0e0e0;
}

/* ---------- Reward Banner ---------- */

.gosy-reward-banner {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gosy-reward-banner p {
    margin: 0;
    font-size: 14px;
    color: #5d4e00;
}

.gosy-reward-banner--claimed {
    background: #e6f4ea;
}

.gosy-reward-banner--claimed p {
    color: #1e7e34;
    font-weight: 600;
}

/* ---------- Review Readonly ---------- */

.gosy-review-readonly__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.gosy-review-readonly__text {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 8px;
}

.gosy-review-readonly__date {
    font-size: 12px;
    color: #999;
    margin: 0 0 4px;
}

.gosy-review-readonly__points {
    font-size: 13px;
    font-weight: 600;
    color: #4CAF50;
    margin: 4px 0 0;
}

/* ---------- Load More ---------- */

.gosy-reviews-list__more {
    text-align: center;
    margin-top: 20px;
}

/* ---------- Login Prompt ---------- */

.gosy-login-prompt {
    text-align: center;
    font-size: 14px;
    color: #757575;
    padding: 20px;
}

/* ---------- No Results ---------- */

.gosy-no-results {
    text-align: center;
    font-size: 14px;
    color: #999;
    padding: 24px;
}

/* ---------- Feedback Messages ---------- */

.gosy-review-form__feedback {
    margin-top: 12px;
    font-size: 14px;
    padding: 10px;
    border-radius: 6px;
}

.gosy-review-form__feedback--success {
    background: #e6f4ea;
    color: #1e7e34;
}

.gosy-review-form__feedback--error {
    background: #fce8e8;
    color: #d63638;
}

/* ---------- Loading State ---------- */

.gosy-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- Animations ---------- */

@keyframes gosy-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gosy-fade-in {
    animation: gosy-fade-in 0.4s ease;
}

/* ==========================================================================
   Attended Events Shortcode — [gosy_attended_events]
   ========================================================================== */

/* ---------- Filter buttons ---------- */

.gosy-attended-filter-btn {
    padding: 7px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: all 0.15s ease;
    line-height: 1;
}

.gosy-attended-filter-btn:hover {
    border-color: #FFC107;
    color: #5d4e00;
}

.gosy-attended-filter-btn--active {
    background: var(--theme-palette-color-1, #e67e22);
    border-color: var(--theme-palette-color-1, #e67e22);
    color: #fff;
}

/* ---------- Card grid ---------- */

.gosy-attended-grid {
    margin-top: 0;
}

/* Separación uniforme entre cards — horizontal via padding nativo de ep-card-col-6,
   vertical forzada aquí para que todas las filas tengan el mismo espacio */
.gosy-attended-grid .gosy-attended-card {
    padding-bottom: 20px;
}

/* ---------- Card inner wrapper ---------- */

/* La columna ocupa toda la altura disponible para que las dos cards de cada
   fila queden a la misma altura aunque tengan contenido distinto */
.gosy-attended-card {
    display: flex;
    flex-direction: column;
}

.gosy-attended-card__inner {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex: 1; /* ocupa todo el alto de la columna */
}

.gosy-attended-card__inner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* ---------- Thumbnail ---------- */

.gosy-attended-thumb {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.gosy-attended-thumb__img {
    width: 100%;
    height: 185px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gosy-attended-card__inner:hover .gosy-attended-thumb__img {
    transform: scale(1.04);
}

.gosy-attended-thumb__placeholder {
    height: 185px;
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Badge over image ---------- */

.gosy-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gosy-card-badge--rated {
    background: rgba(255, 248, 200, 0.95);
    color: #7a6000;
    border: 1px solid rgba(255, 193, 7, 0.6);
}

.gosy-card-badge--upgrade {
    background: rgba(255, 237, 213, 0.95);
    color: #7c3a00;
    border: 1px solid rgba(230, 126, 34, 0.5);
}

.gosy-card-badge--unrated {
    background: rgba(255, 255, 255, 0.92);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ---------- Card title ---------- */

.gosy-attended-card__title {
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 8px;
}

.gosy-attended-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gosy-attended-card__title a:hover {
    color: var(--theme-palette-color-1, #e67e22);
}

/* ---------- Card meta (date + venue) ---------- */

.gosy-attended-card__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.gosy-attended-card__meta-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.gosy-attended-card__meta-icon {
    font-size: 13px !important;
    color: #bbb;
    flex-shrink: 0;
}

/* ---------- Rating section inside card ---------- */

.gosy-attended-rating {
    margin-top: auto; /* empuja la sección de rating al fondo de la tarjeta */
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    text-align: center;
}

.gosy-attended-rating .gosy-rating-card--minimal {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.gosy-attended-rating .gosy-rating-card--minimal .gosy-rating-card__icon,
.gosy-attended-rating .gosy-rating-card--minimal .gosy-rating-card__title,
.gosy-attended-rating .gosy-rating-card--minimal .gosy-rating-card__subtitle {
    display: none !important;
}

.gosy-attended-rating__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 6px;
    color: #aaa;
}

.gosy-attended-rating__label--upgrade {
    color: #e67e22;
}

.gosy-attended-rating__label--rated {
    color: #4CAF50;
}

/* ---------- Pagination ---------- */

.gosy-attended-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.gosy-attended-pagination__prev:disabled,
.gosy-attended-pagination__next:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ---------- Points banner tiers ---------- */

.gosy-points-tier {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 8px;
    padding: 8px 14px;
}

.gosy-points-tier__stars {
    font-size: 15px;
    flex-shrink: 0;
}

.gosy-points-tier__label {
    flex: 1;
    font-size: 13px;
}

.gosy-points-tier__value {
    font-size: 14px;
    font-weight: 700;
    color: #e67e22;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .gosy-rating-stars {
        gap: 4px;
    }

    .gosy-review-item {
        flex-direction: column;
        gap: 10px;
    }

    .gosy-review-item__avatar img {
        width: 40px;
        height: 40px;
    }

    .gosy-review-form-wrapper {
        padding: 16px;
    }

    .gosy-reward-banner {
        flex-direction: column;
        text-align: center;
    }
}
