/* Custom Styles for Ticket System */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    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) !important;
}

.card-header {
    border-bottom: 2px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #495057;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 5px;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .card-body {
        padding: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Profile page responsive */
    .profile-image-wrapper {
        width: 100px;
        height: 100px;
    }

    .profile-image-wrapper-lg {
        width: 120px;
        height: 120px;
    }

    .profile-image-placeholder i {
        font-size: 2.5rem;
    }

    .profile-image-wrapper-lg .profile-image-placeholder i {
        font-size: 3.5rem;
    }

    .profile-image-edit-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
        border-width: 2px;
    }
}

@media (max-width: 576px) {
    .profile-image-wrapper {
        width: 80px;
        height: 80px;
    }

    .profile-image-wrapper-lg {
        width: 100px;
        height: 100px;
    }

    .profile-image-placeholder i {
        font-size: 2rem;
    }

    .profile-image-wrapper-lg .profile-image-placeholder i {
        font-size: 3rem;
    }
}

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

.card,
.table,
.alert {
    animation: fadeIn 0.5s ease-out;
}

/* Status and Priority specific colors */
.text-priority-critical {
    color: var(--danger-color);
}

.text-priority-high {
    color: var(--warning-color);
}

.text-priority-medium {
    color: var(--info-color);
}

.text-priority-low {
    color: var(--success-color);
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom utility classes */
.shadow-sm-hover:hover {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Stats cards on dashboard */
.bg-primary,
.bg-info,
.bg-warning,
.bg-success {
    background: linear-gradient(135deg, var(--bs-bg-opacity, 1), rgba(255, 255, 255, 0.1));
}

/* Comment section styling */
.border-bottom:last-child {
    border-bottom: none !important;
}

/* Profile Image */
.profile-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 50%;
}

.profile-image-wrapper-lg {
    width: 150px;
    height: 150px;
}

.profile-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
}

.profile-image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #dee2e6;
}

.profile-image-placeholder i {
    font-size: 3.5rem;
    color: #adb5bd;
}

.profile-image-wrapper-lg .profile-image-placeholder i {
    font-size: 4.5rem;
}

.profile-image-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.85rem;
}

.profile-image-edit-btn:hover {
    background-color: #0b5ed7;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
