/**
 * Glosowanie Module Styles
 */

/* Common styles */
.sgg-glosowanie {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.sgg-glosowanie-header {
    margin-bottom: 30px;
    text-align: center;
}

.sgg-glosowanie-pytanie {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.sgg-glosowanie-status {
    color: #aaa;
    font-size: 14px;
    margin: 0;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.sgg-status-before {
    background: #fbbf24;
    color: #000;
}

.sgg-status-active {
    background: #3b82f6;
    color: #fff;
}

.sgg-status-ended {
    background: #6b7280;
    color: #fff;
}

.sgg-total-votes {
    text-align: center;
    color: #aaa;
    margin-top: 20px;
    font-size: 14px;
}

.sgg-voted-message,
.sgg-info-message {
    text-align: center;
    color: #3b82f6;
    font-size: 18px;
    padding: 20px;
}

/* Common image styles */
.sgg-opcja-grafika,
.sgg-progress-grafika,
.sgg-radio-grafika {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    margin-right: 10px;
    vertical-align: middle;
}

/* Template 1 - Basic */
.sgg-glosowanie-template1 .sgg-glosowanie-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sgg-glosowanie-template1 .sgg-vote-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgg-glosowanie-template1 .sgg-vote-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sgg-glosowanie-template1 .sgg-result-item {
    margin-bottom: 20px;
}

.sgg-glosowanie-template1 .sgg-result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #fff;
}

.sgg-glosowanie-template1 .sgg-result-opcja {
    font-weight: bold;
}

.sgg-glosowanie-template1 .sgg-result-stats {
    color: #3b82f6;
}

.sgg-glosowanie-template1 .sgg-result-bar {
    background: #2d2d3a;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.sgg-glosowanie-template1 .sgg-result-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    height: 100%;
    transition: width 0.5s ease;
}

/* Template 2 - Cards */
.sgg-glosowanie-template2 .sgg-sort-menu {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #2d2d3a;
    border-radius: 8px;
}

.sgg-glosowanie-template2 .sgg-sort-menu label {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-right: 15px;
}

.sgg-glosowanie-template2 .sgg-sort-select {
    background: #1a1a2e;
    color: #fff;
    border: 2px solid #3b82f6;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sgg-glosowanie-template2 .sgg-sort-select:hover {
    border-color: #2563eb;
    background: #252538;
}

.sgg-glosowanie-template2 .sgg-sort-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.sgg-glosowanie-template2 .sgg-glosowanie-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.sgg-glosowanie-template2 .sgg-team-logo {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.sgg-glosowanie-template2 .sgg-card-vote:hover .sgg-team-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.sgg-glosowanie-template2 .sgg-info-icon {
    width: 24px;
    height: 24px;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 auto 10px auto;
    position: relative;
    z-index: 10;
}

.sgg-glosowanie-template2 .sgg-info-icon img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(96%) saturate(1234%) hue-rotate(199deg) brightness(98%) contrast(93%);
    transition: all 0.3s ease;
}

.sgg-glosowanie-template2 .sgg-info-icon:hover {
    transform: scale(1.1);
}

.sgg-glosowanie-template2 .sgg-info-icon:hover img {
    filter: brightness(0) saturate(100%) invert(37%) sepia(93%) saturate(1234%) hue-rotate(207deg) brightness(95%) contrast(91%);
}

.sgg-glosowanie-template2 .sgg-card-vote {
    background: #2d2d3a;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sgg-glosowanie-template2 .sgg-vote-button {
    pointer-events: auto;
}

.sgg-glosowanie-template2 .sgg-info-icon {
    pointer-events: auto;
}

.sgg-glosowanie-template2 .sgg-card-vote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    z-index: 0;
}

.sgg-glosowanie-template2 .sgg-card-result {
    background: #2d2d3a;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #404040;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sgg-glosowanie-template2 .sgg-card-grafika {
    width: 150px !important;
    height: 150px !important;
    object-fit: scale-down !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
    flex-shrink: 0 !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

.sgg-glosowanie-template2 .sgg-card-vote:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.sgg-glosowanie-template2 .sgg-card-header {
    text-align: center;
    width: 100%;
}

.sgg-glosowanie-template2 .sgg-card-header h4 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center;
}

.sgg-glosowanie-template2 .sgg-vote-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.sgg-glosowanie-template2 .sgg-vote-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.sgg-glosowanie-template2 .sgg-card-content {
    text-align: center !important;
    position: relative;
    z-index: 10;
}

.sgg-glosowanie-template2 .sgg-card-content h4 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center !important;
}

.sgg-glosowanie-template2 .sgg-card-body {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.sgg-glosowanie-template2 .sgg-card-percentage {
    font-size: 36px;
    font-weight: bold;
    color: #3b82f6;
}

.sgg-glosowanie-template2 .sgg-card-votes {
    color: #aaa;
    font-size: 14px;
}

.sgg-glosowanie-template2 .sgg-card-bar {
    background: #1a1a2e;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.sgg-glosowanie-template2 .sgg-card-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    height: 100%;
    transition: width 0.5s ease;
}

/* Template 3 - Progress bars */
.sgg-glosowanie-template3 .sgg-glosowanie-radio {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sgg-glosowanie-template3 .sgg-radio-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #2d2d3a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sgg-glosowanie-template3 .sgg-radio-option:hover {
    border-color: #3b82f6;
    background: #333344;
}

.sgg-glosowanie-template3 .sgg-radio-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.sgg-glosowanie-template3 .sgg-radio-label {
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.sgg-glosowanie-template3 .sgg-submit-vote {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.sgg-glosowanie-template3 .sgg-submit-vote:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sgg-glosowanie-template3 .sgg-progress-item {
    margin-bottom: 25px;
}

.sgg-glosowanie-template3 .sgg-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #fff;
}

.sgg-glosowanie-template3 .sgg-progress-label {
    font-weight: bold;
}

.sgg-glosowanie-template3 .sgg-progress-percentage {
    color: #3b82f6;
    font-weight: bold;
}

.sgg-glosowanie-template3 .sgg-progress-bar-container {
    background: #2d2d3a;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.sgg-glosowanie-template3 .sgg-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.sgg-glosowanie-template3 .sgg-progress-count {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* Countdown Timer */
.sgg-countdown-container {
    text-align: center;
    padding: 30px;
}

.sgg-countdown-title {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
}

.sgg-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sgg-countdown-item {
    background: #2d2d3a;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px 25px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.sgg-countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
    border-color: #2563eb;
}

.sgg-countdown-value {
    font-size: 48px;
    font-weight: bold;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 10px;
}

.sgg-countdown-label {
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .sgg-glosowanie {
        padding: 20px;
    }
    
    .sgg-glosowanie-pytanie {
        font-size: 20px;
    }
    
    .sgg-glosowanie-template2 .sgg-glosowanie-cards {
        grid-template-columns: 1fr;
    }
    
    .sgg-countdown {
        gap: 10px;
    }
    
    .sgg-countdown-item {
        min-width: 70px;
        padding: 15px 10px;
    }
    
    .sgg-countdown-value {
        font-size: 32px;
    }
    
    .sgg-countdown-label {
        font-size: 12px;
    }
}
