/* ===================================
    Review Poll Elementor Widget Style
   ===================================*/

/* Main container with proper clearfix */
.perfuma-vote {
    width: 100%;
    clear: both;
    overflow: visible;
    position: relative;
    z-index: 1;
}

/* Options container - default flex layout */
.perfuma-vote-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    clear: both;
    position: relative;
}

/* Grid layout (handled by Elementor controls) */
.perfuma-vote-options[style*="display: grid"] {
    display: grid !important;
}

/* Individual vote option card */
.vote-option-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 100px;
    
    /* Default flex behavior */
    flex: 1 1 0;
    min-width: 120px;
}

/* Hover effect */
.vote-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Voted state */
.vote-option-card.voted {
    cursor: pointer;
}

/* Active/pressing state */
.vote-option-card:active {
    transform: translateY(0);
}

/* Content wrapper inside card */
.vote-option-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}

/* Icon position variations */
.vote-option-content.icon-position-inline {
    flex-direction: row;
    gap: 0.5rem;
}

.vote-option-content.icon-position-top {
    flex-direction: column;
    gap: 0.5rem;
}

.vote-option-content.icon-position-bottom {
    flex-direction: column-reverse;
    gap: 0.5rem;
}

/* Icon wrapper */
.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon styling */
.icon-vote-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.2s ease;
    color: #cacaca;
    font-size: 24px;
}

.vote-option-card:hover .icon-vote-action {
    transform: scale(1.1);
}

/* Vote button name/label */
.vote-button-name {
    display: block;
    padding: 0.25rem 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Progress bar container wrapper */
.voting-small-chart-size {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    width: 100%;
    flex-shrink: 0;
}

/* Progress bar container */
.progress-bar-container {
    width: 100%;
    min-width: 50px;
    height: 0.3rem;
    border-radius: 0.2rem;
    background: rgba(204, 224, 239, 0.4);
    overflow: hidden;
    position: relative;
}

/* Progress bar fill */
.progress-bar-fill {
    height: 100%;
    border-radius: 0.2rem;
    opacity: 1;
    transition: width 0.5s ease-in-out;
    width: 0;
    min-width: 0;
}

/* Vote Count Styles */
.vote-count-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    flex-shrink: 0;
}

.vote-count {
    font-weight: 600;
    line-height: 1;
}

.vote-count-label {
    font-size: 0.75rem;
    text-transform: lowercase;
    line-height: 1;
}

/* Message Styles */
.perfuma-vote-message {
    padding: 1rem;
    text-align: center;
    border: 1px dashed #cccccc;
    border-radius: 4px;
    background: #f9f9f9;
    margin: 1rem 0;
    width: 100%;
    box-sizing: border-box;
}

.perfuma-vote-message-info {
    border-color: #3498db;
    background: #ebf5fb;
    color: #2874a6;
}

.perfuma-vote-message-warning {
    border-color: #f39c12;
    background: #fef5e7;
    color: #b9770e;
}

.perfuma-vote-message-error {
    border-color: #e74c3c;
    background: #fadbd8;
    color: #c0392b;
}

/* Notification Messages (temporary feedback) */
.perfuma-vote-message-notification {
    padding: 1rem;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.perfuma-vote-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.perfuma-vote-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.perfuma-vote-message-notification a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.perfuma-vote-message-notification a:hover {
    opacity: 0.8;
}

.perfuma-vote-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .perfuma-vote-options {
        gap: 0.75rem;
    }

    .vote-option-card {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .icon-vote-action {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .perfuma-vote-options {
        gap: 0.5rem;
    }

    .vote-option-card {
        min-width: 80px;
        padding: 0.5rem;
    }
    
    .vote-button-name {
        font-size: 0.875rem;
    }
}