/* Custom Styles for Il Sentiero dei Draghi */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Navbar Styling */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Table Enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.2s;
}

.btn i {
    margin-right: 0.25rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
}

.game-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.game-actions form {
    display: inline-flex;
    margin: 0;
}

.game-action,
.game-actions > .btn {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.game-action i,
.game-actions > .btn i {
    margin-right: 0;
}

.compact-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
}

.compact-edit-form > .row {
    display: contents;
}

.compact-edit-form > .mb-4,
.compact-edit-form > hr,
.compact-edit-form > .d-flex {
    grid-column: 1 / -1;
}

.compact-edit-form > .mb-4 {
    margin-bottom: 0.75rem !important;
}

.compact-edit-form .mb-3 {
    margin-bottom: 0.75rem !important;
}

.compact-loan-form {
    display: block;
}

.loan-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
    align-items: start;
}

.loan-game-panel,
.loan-person-panel {
    min-width: 0;
}

@media (max-width: 768px) {
    .loan-columns {
        display: block;
    }

    .loan-person-panel {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .compact-edit-form {
        display: block;
    }

    .compact-edit-form > .mb-4 {
        margin-bottom: 1rem !important;
    }
}

/* Alert Styling */
.alert {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

.alert i {
    margin-right: 0.5rem;
}

/* Form Styling */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dashboard Statistics Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning,
.card.bg-secondary {
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
}

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

/* Footer Styling */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Table Warning Row */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-group-sm {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group-sm .btn {
        margin-bottom: 0.25rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .alert {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
