﻿:root {
    --primary-color: #198754;
    --secondary-color: #6f42c1;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #fd7e14;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

/* Mobile-first responsive design */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Touch-friendly buttons */
.btn {
    min-height: 44px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

/* Custom button colors */
.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-success:hover {
        background-color: #146c43;
        border-color: #146c43;
    }

/* Card styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

    .card:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Progress bars */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 1.5s ease-in-out;
}

/* Candidate cards */
.candidate-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

    .candidate-card:hover .card {
        box-shadow: 0 6px 20px rgba(25, 135, 84, 0.15);
        transform: translateY(-2px);
        border-color: var(--primary-color);
    }

    .candidate-card.selected .card {
        border-color: var(--primary-color);
        border-width: 2px;
        box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
        background-color: #f8fff9;
    }

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

.candidate-photo {
    object-fit: cover;
    border: 3px solid #dee2e6;
    transition: border-color 0.3s ease;
}

.candidate-card.selected .candidate-photo {
    border-color: var(--primary-color);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

/* Form controls */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    }

/* Loading states */
.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Badge styling */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Responsive typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .candidate-card .card-body {
        padding: 1rem 0.75rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .display-1 {
        font-size: 3rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: #f8f9fa;
    }

    .card {
        background-color: #343a40;
        color: #f8f9fa;
    }

    .form-control {
        background-color: #495057;
        border-color: #6c757d;
        color: #f8f9fa;
    }

        .form-control:focus {
            background-color: #495057;
            border-color: var(--primary-color);
            color: #f8f9fa;
        }
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-soft {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
