/**
 * myBTBdb Modern - Custom Styles
 */

/* Custom Colors */
:root {
    --btb-primary: #0d6efd;
    --btb-secondary: #6c757d;
    --btb-success: #198754;
    --btb-warning: #ffc107;
    --btb-danger: #dc3545;
    --btb-info: #0dcaf0;
}

/* Global Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, var(--btb-primary) 0%, #0856d6 100%);
}

/* Bear Grid */
.bear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.bear-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bear-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bear-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.bear-card-body {
    padding: 1rem;
}

.bear-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.bear-card-meta {
    font-size: 0.8rem;
    color: #666;
}

/* Ratings */
.rating {
    color: #ffc107;
}

.rating-readonly {
    color: #e9ecef;
}

/* Collection Status Icons */
.collection-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.status-owned { color: var(--btb-success); }
.status-wanted { color: var(--btb-warning); }
.status-trade { color: var(--btb-info); }

/* Forms */
.form-control:focus {
    border-color: var(--btb-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Search */
.search-container {
    position: relative;
}

.search-container .form-control {
    padding-right: 2.5rem;
}

.search-container .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem !important;
    }
    
    .jumbotron .display-4 {
        font-size: 2rem;
    }
    
    .bear-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Utilities */
.text-decoration-none:hover {
    text-decoration: none !important;
}

.cursor-pointer {
    cursor: pointer;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--btb-primary) 0%, #0856d6 100%);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Flash Messages */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Collection Management */
.collection-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.collection-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Bear Details */
.bear-image-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.bear-image-main {
    border-radius: 0.5rem;
    overflow: hidden;
}

.bear-image-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.bear-image-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.bear-image-thumb:hover,
.bear-image-thumb.active {
    opacity: 1;
}

.bear-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Statistics */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Country Flags */
.country-select-container {
    position: relative;
}

.selected-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    pointer-events: none;
    z-index: 10;
}

.country-select-container .form-select {
    padding-left: 40px;
}

.country-select-container .input-group-text {
    padding-right: 0;
}