/**
 * Sports Meister - Frontend Shortcodes CSS
 * FAZA 6: User-facing shortcode styles
 */

/* My Matches Shortcode */
.smc-my-matches {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}
button.smc-round-tab {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-8054e71);
    border-style: none;
    border-radius: 1rem 1rem 1rem 1rem;
    padding: 2px 8px;
    font-size: 12px;
}
.smc-matches-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.smc-filter-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.smc-filter-btn:hover {
    background: #e0e0e0;
}

.smc-filter-btn.active {
    background: #4b92af;
    color: white;
    border-color: #4b92af;
}

/* Frontend Tables */
.smc-frontend-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.smc-frontend-table thead {
    background: #f5f5f5;
}

.smc-frontend-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4b92af;
    border-bottom: 2px solid #ddd;
}

.smc-frontend-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.smc-frontend-table tbody tr:hover {
    background: #f9f9f9;
}

.smc-frontend-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

/* Status Badges */
.smc-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.smc-status-scheduled {
    background: #e7f3ff;
    color: #0073aa;
}

.smc-status-upcoming {
    background: #fff8e5;
    color: #856404;
}

.smc-status-completed {
    background: #d4edda;
    color: #155724;
}

.smc-status-disputed {
    background: #f8d7da;
    color: #721c24;
}

.smc-status-pending-approval {
    background: #fff3cd;
    color: #856404;
}

.smc-status-postponed {
    background: #e2e3e5;
    color: #383d41;
}

.smc-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Bracket Shortcode */
.smc-bracket-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.smc-bracket-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.smc-bracket-header h3 {
    margin: 0;
    color: #4b92af;
    font-size: 1.3rem;
}

.smc-bracket-svg-wrapper {
    overflow-x: auto;
    background: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #e5e5e5;
}

.smc-bracket-svg {
    width: 100%;
    min-width: 600px;
}

/* Calendar Shortcode */
.smc-calendar-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.smc-calendar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.smc-calendar-header h3 {
    margin: 0;
    color: #4b92af;
    font-size: 1.3rem;
}

.smc-fullcalendar {
    background: white;
}

/* Override FullCalendar styles */
.smc-fullcalendar .fc {
    font-family: inherit;
    font-size: 1rem;
}

.smc-fullcalendar .fc-button-primary {
    background-color: #4b92af;
    border-color: #4b92af;
}

.smc-fullcalendar .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #3a7590;
    border-color: #3a7590;
}

.smc-fullcalendar .fc-button-primary:hover {
    background-color: #3a7590;
}

.smc-fullcalendar .fc-col-header-cell {
    background-color: #f5f5f5;
    color: #4b92af;
    font-weight: 600;
}

.smc-fullcalendar .fc-daygrid-day.fc-day-today {
    background-color: #e7f3ff;
}

.smc-fullcalendar .fc-event {
    background-color: #4b92af;
    border-color: #3a7590;
}

.smc-fullcalendar .fc-event-title {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 4px;
}

/* Standings Shortcode */
.smc-standings-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.smc-standings-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

.smc-standings-header h3 {
    margin: 0;
    color: #4b92af;
    font-size: 1.3rem;
}

.smc-standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.smc-standings-table thead {
    background: #f5f5f5;
}

.smc-standings-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--smc-gray-900);
    border-bottom: 2px solid #ddd;
    padding: 1rem 1.5rem !important;
}

.smc-standings-table th:first-child {
    text-align: left;
}

.smc-standings-table td {
    padding: 1rem 1.5rem !important;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;

}

.smc-standings-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--smc-gray-900);
}

.smc-standings-table tbody tr:hover {
    background: #f9f9f9;
}

.smc-standings-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

/* Position Colors */
.smc-standings-pos-1 {
    background: #d4edda;
}

.smc-standings-pos-1 td:first-child {
    color: #155724;
    font-weight: 700;
}

.smc-standings-pos-2 {
    background: #d1ecf1;
}

.smc-standings-pos-3 {
    background: #fff3cd;
}

/* Winner highlight */
.smc-standings-row-winner {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f6 100%) !important;
   /* border-left: 4px solid #2e7d32; */
}

.smc-standings-row-winner td {
    border-bottom-color: #d8ecd9;
    background: #f1f8f6 !important;
}

.smc-standings-row-winner .smc-team-name {
    color: #1b5e20;
    font-weight: 700;
}

.smc-standings-winner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #2e7d32;
    color: #fff;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
}

/* Loading States */
/* Spinner removed - use progress bar instead */
.smc-loading {
    display: none !important;
}

@keyframes smc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.smc-loading-text {
    color: #999;
    font-size: 0.9rem;
    padding: 20px;
    text-align: center;
}

/* Empty States */
.smc-empty-state {
    padding: 20px;
    text-align: center;
    color: #999;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Alerts */
.smc-alert {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.smc-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.smc-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.smc-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.smc-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Text Utilities */
.smc-text-center {
    text-align: center;
}

.smc-text-right {
    text-align: right;
}

.smc-text-muted {
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    ..smc-standings-winner-badge {
        display: none;
    }
    .smc-my-matches,
    .smc-bracket-container,
    .smc-calendar-container,
    .smc-standings-container {
        padding: 15px;
    }

    .smc-matches-filter {
        flex-direction: column;
    }

    .smc-filter-btn {
        width: 100%;
        text-align: center;
    }

    .smc-frontend-table,
    .smc-standings-table {
        font-size: 0.9rem;
    }

    .smc-frontend-table th,
    .smc-frontend-table td,
    .smc-standings-table th,
    .smc-standings-table td {
        padding: 8px;
        font-size: 14px;
    }

    .smc-bracket-svg-wrapper {
        overflow-x: auto;
        padding: 10px;
    }
}

@media (max-width: 1024px) {
    
    .smc-standings-table {
        border-collapse: separate;
        border-spacing: 0;
        box-shadow: none;
    }

    .smc-standings-table thead {
        display: none;
    }

    .smc-standings-table tbody tr {
        display: block;
        margin-top: 20px;
        margin-bottom: 0;
    /*    border: 1px solid #e5e5e5; */
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
       /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04); */
    }

    .smc-standings-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px !important;
        border-bottom: 1px solid #f1f1f1;
        gap: 12px;
    }

    .smc-standings-table td:last-child {
        border-bottom: 0;
    }

    .smc-standings-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #4b92af;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.78rem;
        flex: 0 0 110px;
        text-align: left;
    }

    .smc-standings-table .smc-team-name {
        font-weight: 700;
        color: var(--smc-gray-900);
        justify-content: space-between;
    }

    .smc-standings-table .smc-logo img {
        width: 40px;
        height: 40px;
    }

    .smc-standings-table .smc-logo {
        justify-content: flex-start;
    }

    .smc-standings-table .smc-points strong {
        font-size: 1.05rem;
    }
}

/* Results Manager Progress Bar */
.smc-progress-bar {
    width: 400px;
    height: 25px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.smc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b92af, #5ca3c0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease, background 0.3s ease;
    position: relative;
}

.smc-progress-fill.completed {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.smc-progress-fill.is-zero {
    min-width: 68px;
    background: #d6dde3;
    justify-content: center;
}

.smc-progress-fill.is-zero .smc-progress-text {
    color: #2f3c44;
    text-shadow: none;
}

.smc-progress-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.smc-rounds-toolbar .smc-progress-header.completed {
    background: #f0f7f3;
    border: 1px solid #2e7e33;
    border-radius: 1rem;
    padding: 0 8px;
}

.smc-rounds-toolbar .smc-progress-header.completed .smc-progress-label,
.smc-rounds-toolbar .smc-progress-header.completed .smc-progress-stats {
    color: #2e7e33;
    font-weight: 600;
}

.smc-open-results-popup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.smc-open-results-popup::before {
    content: "";
    width: 1.05em;
    height: 1.05em;
    display: inline-block;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 0.95;
}

