/* Custom styles for Floorball Event Tagging App */

/* General styles */
body {
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
}

/* Card styles */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #e9ecef;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Dashboard styles */
.dashboard-card {
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Floorball field styles */
.floorball-field {
    background: linear-gradient(90deg, #e8b580 0%, #e8b580 100%);
    border: 4px solid #333;
    border-radius: 30px;
    position: relative;
    cursor: crosshair;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

/* Official floorball field dimensions ratio 40m x 20m for large, 28m x 16m for small */
.field-large {
    width: 800px;
    height: 400px; /* 2:1 ratio for 40m x 20m */
}

.field-small {
    width: 560px;
    height: 320px; /* 1.75:1 ratio for 28m x 16m */
}

/* Field markings */
.field-marking {
    position: absolute;
    border: 2px solid white;
}

/* Center line - divides field in half */
.center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 3px solid white;
    transform: translateX(-50%);
}

/* Center circle - 3m diameter in real field */
.center-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
}

/* Goal areas - proper floorball goal area design */
.goal-area {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid white;
    position: absolute;
}

.goal-area-left {
    left: 0;
    top: 50%;
    width: 80px; /* Goal area width */
    height: 120px; /* Goal area height */
    transform: translateY(-50%);
    border-left: none;
    border-radius: 0 40px 40px 0; /* Rounded right side */
}

.goal-area-right {
    right: 0;
    top: 50%;
    width: 80px; /* Goal area width */
    height: 120px; /* Goal area height */
    transform: translateY(-50%);
    border-right: none;
    border-radius: 40px 0 0 40px; /* Rounded left side */
}

/* Goals - proper floorball goal posts */
.goal {
    position: absolute;
    background: #333;
    border: 2px solid white;
    border-radius: 3px;
}

.goal-left {
    left: -8px;
    top: 50%;
    width: 16px; /* Goal post width */
    height: 40px; /* Goal post height */
    transform: translateY(-50%);
}

.goal-right {
    right: -8px;
    top: 50%;
    width: 16px; /* Goal post width */
    height: 40px; /* Goal post height */
    transform: translateY(-50%);
}

/* Tag markers on field */
.tag-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
    border: 2px solid white;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all 0.2s;
}

.tag-marker:hover {
    width: 16px;
    height: 16px;
    background: #ff6666;
}

.tag-marker.selected {
    background: #ffaa00;
    width: 16px;
    height: 16px;
}

/* Tag modal styles */
.tag-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.tag-section {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.tag-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Player selection styles */
.player-select {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.player-option {
    display: block;
    padding: 0.375rem 0.75rem;
    text-decoration: none;
    color: #495057;
    border-radius: 0.25rem;
    transition: background-color 0.15s;
}

.player-option:hover {
    background-color: #e9ecef;
    color: #495057;
}

.player-option.selected {
    background-color: #007bff;
    color: white;
}

/* Tag instance list styles */
.tag-instance {
    border-left: 4px solid #007bff;
    background: white;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.tag-instance:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.tag-instance.shot {
    border-left-color: #dc3545;
}

.tag-instance.pass {
    border-left-color: #28a745;
}

.tag-instance.block {
    border-left-color: #ffc107;
}

.tag-instance.faceoff {
    border-left-color: #6f42c1;
}

/* Heatmap styles */
.heatmap-container {
    position: relative;
    display: inline-block;
}

.heatmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.heat-point {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.8) 0%, rgba(255, 0, 0, 0.4) 50%, transparent 100%);
}

/* Export button styles */
.export-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    color: white;
}

/* Form styles */
.form-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-section h5 {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .floorball-field {
        width: 100%;
        max-width: 400px;
        height: 200px;
    }
    
    .field-large,
    .field-small {
        width: 100%;
        max-width: 400px;
        height: 200px;
    }
    
    .goal-area-left,
    .goal-area-right {
        width: 40px;
        height: 60px;
    }
    
    .center-circle {
        width: 30px;
        height: 30px;
    }
    
    .goal-left,
    .goal-right {
        width: 8px;
        height: 20px;
    }
}

/* Animation styles */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 0.5s ease-in-out;
}

/* Loading styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Success states */
.success-flash {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Shake animation for required tag validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.6s ease-in-out;
}

/* Required tag highlight styling */
.tag-type-card.border-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}
