/* Salaloos - DigiKlass stiilid */

/* Osalejate sisestuskast */
#participantsInput {
    line-height: 1.6;
}

#duplicateWarning {
    font-size: 0.9rem;
    font-weight: normal;
    margin-left: 10px;
}

/* Tulemuste ala */
.result-item {
    padding: 0.75rem;
    border-left: 4px solid #3273dc;
    background: #f5f9ff;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-item.ring {
    border-left-color: #00d1b2;
}

.result-item.pair {
    border-left-color: #ffdd57;
}

.result-item.trio {
    border-left-color: #ff6b6b; /* Punakas kolmiku jaoks */
    background-color: #fff5f5;
}

.result-item.trio-circular {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    gap: 0.75rem;
}

.trio-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.trio-arrow {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.3rem;
}

.trio-label {
    font-size: 0.85rem;
    color: #cc4444;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.result-item.group {
    border-left-color: #ff3860;
}

.result-from {
    font-weight: 600;
    color: #363636;
}

.result-arrow {
    color: #7a7a7a;
    font-size: 1.2rem;
}

.result-to {
    font-weight: 600;
    color: #3273dc;
}

/* Gruppide kuvamine */
.group-result {
    padding: 1rem;
    background: #f5f9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 2px solid #3273dc;
}

.group-title {
    font-weight: 700;
    color: #3273dc;
    margin-bottom: 0.5rem;
}

.group-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.group-member {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #dbdbdb;
    font-weight: 500;
}

/* Fullscreen modal - Kuva kõiki */
.fullscreen-content {
    width: 95vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.all-results-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.big-result-item {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.big-result-item.ring {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
}

.big-result-item.pair {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: 2px solid #fbc02d;
}

.big-result-item.trio {
    background: linear-gradient(135deg, #fff5f5 0%, #ffcdd2 100%);
    border: 2px solid #f44336;
    grid-column: 1 / -1;
}

.big-result-item .name {
    color: #1a1a1a;
    font-weight: 700;
}

.big-result-item .arrow {
    color: #666;
    font-size: 1.5rem;
}

.result-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #f44336;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

@media screen and (max-width: 768px) {
    .all-results-display {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .big-result-item {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }
}

/* One by one modal - Kompaktne */
.one-by-one-content {
    width: 90vw;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.reveal-item-compact {
    padding: 1rem 1.5rem;
    margin: 0.75rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reveal-item-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.reveal-item-compact.revealed {
    background: white;
    color: #363636;
    border: 2px solid #00d1b2;
}

.reveal-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.reveal-content {
    display: flex;
    align-items: center;
}

.reveal-hidden {
    font-size: 2rem;
    opacity: 0.5;
}

.reveal-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reveal-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d1b2;
}

.reveal-target {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00d1b2;
}

.reveal-item-compact.revealed .reveal-target {
    color: #363636;
}

/* Prinditavad sedelid */
.print-slips {
    display: block !important;
    position: fixed;
    left: -9999px;
    top: -9999px;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .print-slips,
    .print-slips * {
        visibility: visible !important;
    }
    
    .print-slips {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100%;
        display: block !important;
    }
    
    .slip {
        page-break-inside: avoid;
        border-top: 2px dashed #333;
        border-left: 2px dashed #333;
        border-right: 2px dashed #333;
        margin: 0;
        min-height: 70px;
        background: white;
        display: flex;
        flex-direction: row;
    }
    
    .slip:last-child {
        border-bottom: 2px dashed #333;
    }
    
    .slip-left {
        flex: 1;
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-right: 2px dashed #999;
    }
    
    .slip-from {
        font-size: 1.2rem;
        font-weight: 700;
        color: #000;
        text-align: center;
    }
    
    .slip-right {
        flex: 2;
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .slip-instruction {
        font-size: 0.85rem;
        color: #666;
        text-align: center;
    }
    
    .slip-to {
        font-size: 1.2rem;
        font-weight: 900;
        color: #000;
        padding: 0.5rem 0.75rem;
        border: 2px solid #000;
        text-align: center;
        background: white;
        width: 100%;
    }
}

/* Animatsioonid */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item,
.group-result {
    animation: fadeIn 0.5s ease-out;
}

/* Konfetti efekt */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f0f;
    top: -10px;
    animation: confetti-fall 3s linear;
    pointer-events: none;
    z-index: 9999;
}

/* Hoiatused ja teated */
.constraint-warning {
    background: #fffacd;
    border-left: 4px solid #ffdd57;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-radius: 4px;
}

.constraint-warning .icon {
    color: #ffdd57;
}

/* Seemnete info */
.seed-info {
    background: #f0f7ff;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.seed-info code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Osalejate lohistamine */
.participant-item.dragging {
    opacity: 0.5;
}

/* Responsive */
@media screen and (max-width: 1023px) {
    .columns {
        display: block;
    }
    
    .column {
        width: 100% !important;
        margin-bottom: 1rem;
    }
}

/* QR koodide vaade */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.qr-card {
    border: 2px solid #dbdbdb;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background: white;
}

.qr-card .qr-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #363636;
}

.qr-card canvas {
    margin: 0.5rem auto;
}

.qr-card .qr-url {
    font-size: 0.8rem;
    color: #7a7a7a;
    word-break: break-all;
}
