/**
 * Pick One - Card Styles
 */

/* Feed */
.po-feed {
    padding: var(--po-space-md);
}

.po-feed__cards {
    display: flex;
    flex-direction: column;
    gap: var(--po-space-lg);
}

.po-feed__loader,
.po-feed__end,
.po-feed__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--po-space-2xl);
    text-align: center;
}

.po-feed__end-icon {
    font-size: 48px;
    margin-bottom: var(--po-space-md);
}

.po-feed__end-sub {
    color: var(--po-text-muted);
    font-size: var(--po-font-size-sm);
}

/* Card */
.po-card {
    background: var(--po-surface);
    border-radius: var(--po-radius-xl);
    padding: var(--po-space-lg);
    position: relative;
    overflow: hidden;
}

.po-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient);
}

.po-card[data-type="comparacion"] {
    --card-gradient: var(--po-gradient-comparacion);
    --card-color: var(--po-comparacion-1);
}

.po-card[data-type="debate"] {
    --card-gradient: var(--po-gradient-debate);
    --card-color: var(--po-debate-1);
}

.po-card[data-type="relatable"] {
    --card-gradient: var(--po-gradient-relatable);
    --card-color: var(--po-relatable-1);
}

.po-card[data-type="decision"] {
    --card-gradient: var(--po-gradient-decision);
    --card-color: var(--po-decision-1);
}

/* Card Header */
.po-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--po-space-lg);
}

.po-card__type {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--po-radius-full);
    font-size: var(--po-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--card-gradient);
    color: #fff;
}

.po-card__votes {
    font-size: var(--po-font-size-sm);
    color: var(--po-text-muted);
}

/* Card Question */
.po-card__question {
    font-size: var(--po-font-size-xl);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--po-space-xl);
    text-align: center;
}

/* Card Options */
.po-card__options {
    display: flex;
    flex-direction: column;
    gap: var(--po-space-md);
}

/* Option Button */
.po-option {
    position: relative;
    width: 100%;
    padding: var(--po-space-md) var(--po-space-lg);
    background: var(--po-surface-hover);
    border: 2px solid var(--po-border);
    border-radius: var(--po-radius-lg);
    text-align: left;
    transition: var(--po-transition-fast);
    overflow: hidden;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.po-option:hover:not(.is-voted):not(.is-disabled) {
    border-color: var(--card-color);
    background: rgba(255, 255, 255, 0.05);
}

.po-option:active:not(.is-voted):not(.is-disabled) {
    transform: scale(0.98);
}

.po-option__text {
    font-size: var(--po-font-size-md);
    font-weight: 500;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* Option Results */
.po-option__result {
    display: none;
    align-items: center;
    gap: var(--po-space-md);
    width: 100%;
}

.po-option.is-voted .po-option__result {
    display: flex;
}

.po-option.is-voted .po-option__text {
    display: none;
}

.po-option__bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--card-gradient);
    opacity: 0.2;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: var(--po-radius-lg);
}

.po-option.is-selected .po-option__bar {
    opacity: 0.4;
}

.po-option__percent {
    font-size: var(--po-font-size-lg);
    font-weight: 800;
    min-width: 50px;
    text-align: right;
    position: relative;
    z-index: 1;
}

.po-option.is-selected {
    border-color: var(--card-color);
}

.po-option.is-selected::after {
    content: '✓';
    position: absolute;
    right: var(--po-space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--card-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.po-option.is-disabled {
    pointer-events: none;
}

/* Feedback */
.po-card__feedback {
    margin-top: var(--po-space-lg);
    padding: var(--po-space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--po-radius-md);
    text-align: center;
}

.po-card__feedback[hidden] {
    display: none;
}

.po-card__feedback-text {
    font-size: var(--po-font-size-md);
    font-weight: 600;
    color: var(--card-color);
}

/* Card Actions */
.po-card__actions {
    display: flex;
    justify-content: center;
    gap: var(--po-space-md);
    margin-top: var(--po-space-lg);
    padding-top: var(--po-space-lg);
    border-top: 1px solid var(--po-border);
}

.po-card__actions[hidden] {
    display: none;
}

.po-card__action {
    width: 44px;
    height: 44px;
    border-radius: var(--po-radius-full);
    background: var(--po-surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--po-text-secondary);
    transition: var(--po-transition-fast);
}

.po-card__action:hover {
    background: var(--po-border);
    color: var(--po-text);
}

/* Vote Animation */
@keyframes po-vote-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.po-card.is-voting {
    animation: po-vote-pulse 0.3s ease;
}

/* Share Sheet */
.po-share-sheet {
    position: fixed;
    inset: 0;
    z-index: var(--po-z-sheet);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.po-share-sheet[hidden] {
    display: none;
}

.po-share-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.po-share-sheet__content {
    position: relative;
    width: 100%;
    max-width: var(--po-max-width);
    background: var(--po-surface);
    border-radius: var(--po-radius-xl) var(--po-radius-xl) 0 0;
    padding: var(--po-space-lg);
    padding-bottom: calc(var(--po-space-lg) + var(--po-safe-bottom));
    transform: translateY(100%);
    animation: po-slide-up 0.3s ease forwards;
}

@keyframes po-slide-up {
    to { transform: translateY(0); }
}

.po-share-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--po-space-lg);
}

.po-share-sheet__header h3 {
    font-size: var(--po-font-size-lg);
    font-weight: 700;
}

.po-share-sheet__close {
    width: 32px;
    height: 32px;
    border-radius: var(--po-radius-full);
    background: var(--po-surface-hover);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.po-share-sheet__preview {
    width: 100%;
    max-width: 300px;
    border-radius: var(--po-radius-md);
    margin: 0 auto var(--po-space-lg);
    display: block;
}

.po-share-sheet__actions {
    display: flex;
    gap: var(--po-space-md);
    justify-content: center;
}

.po-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--po-space-sm);
    padding: var(--po-space-md);
    min-width: 80px;
    background: var(--po-surface-hover);
    border-radius: var(--po-radius-md);
    color: var(--po-text);
    font-size: var(--po-font-size-sm);
    transition: var(--po-transition-fast);
}

.po-share-btn:hover {
    background: var(--po-border);
}
