/* Match Tabs AJAX Styles */

/* Save Button Styles */
.tab-save-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #007cba;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 1.6rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.match-tabs__panel:hover .tab-save-btn,
.match-stats-box__header:hover .tab-save-btn,
.match-header-box:hover .tab-save-btn,
.match-player-stats-box__header:hover .tab-save-btn {
    opacity: 1;
    visibility: visible;
}

.tab-save-btn:hover {
    background: #005a87;
    transform: translateY(-50%) scale(1.05);
}

.tab-save-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.tab-save-btn svg {
    width: 14px;
    height: 14px;
}

/* Tab Header Positioning */
.match-stats-box__header,
.match-header-box .match-stats-box__header,
.match-player-stats-box__header {
    position: relative;
}

/* Saved Tab Indicator */
.js-tab-link.saved {
    position: relative;
}

.js-tab-link.saved::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: #10b981;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Toast Notification Styles */
.match-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    max-width: 400px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #6b7280;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.match-toast--show {
    transform: translateX(0);
}

.match-toast__content {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.match-toast__message {
    flex: 1;
    font-size: 1.6rem;
    line-height: 1.4;
    color: #374151;
}

.match-toast__close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.match-toast__close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Toast Types */
.match-toast--success {
    border-left-color: #10b981;
}

.match-toast--success .match-toast__message {
    color: #065f46;
}

.match-toast--error {
    border-left-color: #ef4444;
}

.match-toast--error .match-toast__message {
    color: #991b1b;
}

.match-toast--warning {
    border-left-color: #f59e0b;
}

.match-toast--warning .match-toast__message {
    color: #92400e;
}

.match-toast--info {
    border-left-color: #3b82f6;
}

.match-toast--info .match-toast__message {
    color: #1e40af;
}

/* Loading State */
.tab-save-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.tab-save-btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Form Validation Styles */
.js-tab-panel input.error,
.js-tab-panel select.error,
.js-tab-panel textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
}

.js-tab-panel .field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .match-toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .match-toast--show {
        transform: translateY(0);
    }
    
    .tab-save-btn {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        width: 100%;
        justify-content: center;
    }
    
    .match-stats-box__header,
    .match-header-box .match-stats-box__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Accessibility */
.match-toast:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}



/* High contrast mode support */
@media (prefers-contrast: high) {
    .match-toast {
        border-width: 2px;
    }
    
    .tab-save-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .match-toast,
    .tab-save-btn,
    .js-tab-link.saved::after {
        transition: none;
        animation: none;
    }
} 