/* Round Item Clickable */
.smc-round-item {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.smc-round-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(75, 146, 175, 0);
    border-radius: var(--smc-border-radius);
    transition: background 0.2s ease;
    pointer-events: none;
}

.smc-round-item:hover::after {
    background: rgba(75, 146, 175, 0.05);
}

.smc-round-item:active::after {
    background: rgba(75, 146, 175, 0.1);
}

/* Cancelled Match Banner in Popup */
.smc-match-cancelled-banner {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}

.smc-match-cancelled-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.smc-match-cancelled-icon {
    width: 24px;
    height: 24px;
    color: #dc3545;
    flex-shrink: 0;
}

.smc-match-cancelled-header h3 {
    margin: 0;
    color: #721c24;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.smc-match-cancelled-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smc-match-cancelled-reason,
.smc-match-cancelled-by,
.smc-match-cancelled-date {
    margin: 0;
    font-size: 14px;
    color: #721c24;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smc-match-cancelled-label {
    font-weight: 600;
    color: #721c24;
}

.smc-match-cancelled-value {
    color: #721c24;
}

/* ===================================================================
   Progress Modal - Competition Creation Progress
   =================================================================== */

.smc-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.smc-progress-modal.smc-progress-visible {
    opacity: 1;
    visibility: visible;
}

.smc-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.smc-progress-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.smc-progress-modal.smc-progress-visible .smc-progress-content {
    transform: translateY(0);
}

.smc-progress-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.smc-progress-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Progress Icon */
.smc-progress-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.smc-progress-icon svg {
    width: 100%;
    height: 100%;
}

/* Spinner Animation */
.smc-spinner circle {
    stroke: var(--smc-primary, #4b92af);
    stroke-linecap: round;
    animation: smc-spinner-dash 1.5s ease-in-out infinite;
}

@keyframes smc-spinner-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Success Icon */
.smc-progress-success-icon svg {
    stroke: #10b981;
    stroke-width: 2;
}

.smc-progress-success-icon circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: smc-success-circle 0.6s ease-out forwards;
}

.smc-progress-success-icon path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: smc-success-check 0.3s 0.4s ease-out forwards;
}

@keyframes smc-success-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes smc-success-check {
    to {
        stroke-dashoffset: 0;
    }
}

/* Warning Icon */
.smc-progress-warning-icon svg {
    fill: #f59e0b;
}

/* Error Icon */
.smc-progress-error-icon svg {
    fill: #ef4444;
}

/* Progress Title */
.smc-progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.5rem;
}

/* Progress Bar */
.smc-progress-bar-container {
    background: #e5e7eb;
    border-radius: 9999px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.smc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--smc-primary, #4b92af), #5ca3c0);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.smc-progress-percentage {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--smc-primary, #4b92af);
    margin-bottom: 1.5rem;
}

/* Progress Details */
.smc-progress-details {
    color: #6b7280;
    font-size: 0.95rem;
}

.smc-progress-current {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.smc-progress-stats {
    font-size: 0.875rem;
}

/* Progress Summary (Complete State) */
.smc-progress-summary {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Progress Actions */
.smc-progress-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.smc-progress-actions .smc-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.smc-progress-actions .smc-btn-primary {
    background: var(--smc-primary, #4b92af);
    color: #fff;
    border: none;
}

.smc-progress-actions .smc-btn-primary:hover {
    background: var(--smc-primary-dark, #3a7590);
}

.smc-progress-actions .smc-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.smc-progress-actions .smc-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Error List */
.smc-progress-error-summary {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1rem;
}

.smc-progress-error-list {
    text-align: left;
    margin-bottom: 1.5rem;
}

.smc-error-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fef2f2;
    border-radius: 8px;
    padding: 1rem;
}

.smc-error-list li {
    padding: 0.5rem 0;
    color: #991b1b;
    font-size: 0.9rem;
    border-bottom: 1px solid #fecaca;
}

.smc-error-list li:last-child {
    border-bottom: none;
}

.smc-error-list strong {
    color: #7f1d1d;
}

/* Close Warning State */
.smc-progress-close-warning p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Progress Modal Responsive */
@media (max-width: 480px) {
    .smc-progress-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .smc-progress-icon {
        width: 60px;
        height: 60px;
    }

    .smc-progress-title {
        font-size: 1.25rem;
    }

    .smc-progress-actions {
        flex-direction: column;
    }

    .smc-progress-actions .smc-btn {
        width: 100%;
    }
}

/* ===================================================================
   Select2 Multiple Fix for Elementor Popups
   Override inline styles set by Select2 JavaScript
   =================================================================== */

/* Make Select2 container larger */
.elementor-popup-modal .select2-selection--multiple {
    min-height: 44px !important;
    padding: 4px 8px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

/* Force search inline to take full width */
.elementor-popup-modal .select2-search--inline {
    width: 100% !important;
    display: block !important;
}

/* Override inline width style on textarea - needs !important to beat inline JS style */
.elementor-popup-modal .select2-search__field,
.elementor-popup-modal textarea.select2-search__field,
.elementor-popup-modal .select2-container .select2-search__field,
.elementor-popup-modal .select2-container--default .select2-search__field {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

/* When there are selected items, allow search to shrink */
.elementor-popup-modal .select2-selection__choice ~ .select2-search--inline {
    width: auto !important;
    display: inline-block !important;
}

.elementor-popup-modal .select2-selection__choice ~ .select2-search--inline .select2-search__field {
    width: auto !important;
    min-width: 0.75em !important;
}

/* Placeholder text style */
.elementor-popup-modal .select2-search__field::placeholder {
    color: #9ca3af !important;
}

/* Focus state */
.elementor-popup-modal .select2-container--focus .select2-selection--multiple {
    border-color: var(--smc-primary, #4b92af) !important;
    box-shadow: 0 0 0 2px rgba(75, 146, 175, 0.1) !important;
}

/* Selected items styling */
.elementor-popup-modal .select2-selection__choice {
    background-color: rgba(75, 146, 175, 0.1) !important;
    border: 1px solid rgba(75, 146, 175, 0.3) !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    margin: 4px 4px 4px 0 !important;
    font-size: 13px !important;
}

.elementor-popup-modal .select2-selection__choice__remove {
    color: var(--smc-primary, #4b92af) !important;
    margin-right: 4px !important;
}
