/* Ticket System Custom Styles */

.ticket-list-section {
    background-color: #f8f9fa;
}

.ticket-list-section .section-title h2 {
    color: #07294D;
    font-weight: 600;
    margin-bottom: 15px;
}

.ticket-list-section .section-title p {
    color: #6c757d;
    font-size: 18px;
}

/* Table Styles */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table thead th {
    background-color: #07294D !important;
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #e9ecef;
}

/* Badge Styles */
.badge {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-primary {
    background-color: #007bff !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
    padding: 20px;
}

.card-body {
    padding: 25px;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

.alert-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-link {
    text-decoration: underline;
    font-weight: 600;
}

.alert-link:hover {
    text-decoration: none;
}

/* Comment Styles */
.comment-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.comment-item:last-child {
    border-bottom: none !important;
}

/* Empty State Styles */
.text-center.py-5 .fa-ticket {
    color: #dee2e6;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Priority and Status Indicators */
.priority-indicator, .status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.priority-high {
    background-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.priority-medium {
    background-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.priority-low {
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

/* Create Ticket Form Enhanced Styles */
.create-ticket-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ticket-icon-wrapper {
    position: relative;
}

.ticket-icon {
    display: inline-block;
    padding: 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.progress-bar-wrapper {
    max-width: 300px;
    margin: 0 auto;
}

.progress {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

/* Form Card Styles */
.card.shadow-lg {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card.shadow-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-header.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: none;
}

/* Form Controls */
.form-control-lg, .form-select-lg {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    height: auto;
    min-height: 56px;
}

.form-control-lg:focus, .form-select-lg:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    transform: translateY(-2px);
}

/* Dropdown Specific Styles */
.form-select-lg {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px 12px;
    padding-right: 50px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select-lg:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23007bff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Dropdown Options Styling */
.form-select-lg option {
    padding: 12px 20px;
    font-size: 16px;
    background-color: white;
    color: #495057;
    border: none;
}

.form-select-lg option:hover {
    background-color: #f8f9fa;
}

.form-select-lg option:checked {
    background-color: #007bff;
    color: white;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group .form-text {
    margin-top: 8px;
}

/* Form Row Alignment */
.row.mb-4 {
    align-items: stretch;
}

.row.mb-4 .col-md-6 {
    display: flex;
    flex-direction: column;
}

.row.mb-4 .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.row.mb-4 .form-group .form-label {
    flex-shrink: 0;
}

.row.mb-4 .form-group .form-select-lg {
    flex: 1;
}

/* Ensure equal height for form groups in same row */
.row.mb-4 .col-md-6 .form-group {
    min-height: 140px; /* Adjust based on your content */
}

/* Bootstrap grid gap support */
.g-3 > * {
    padding: 0.75rem;
}

/* Form group spacing */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group .form-text {
    margin-top: 8px;
    flex-shrink: 0;
}

/* Label Alignment */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.form-label i {
    opacity: 0.8;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Dropdown Container */
.form-select-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Custom Dropdown Arrow */
.form-select-lg {
    cursor: pointer;
}

.form-select-lg:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Focus States */
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Hover States */
.form-select-lg:hover:not(:disabled) {
    border-color: #007bff;
    background-color: #f8f9fa;
}

/* Responsive Dropdown */
@media (max-width: 768px) {
    .form-select-lg {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 45px 12px 15px;
        min-height: 48px;
    }
    
    .form-select-lg option {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .row.mb-4 .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .row.mb-4 .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* Dropdown Animation */
.form-select-lg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-select-lg:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

/* Ensure consistent height across form elements */
.form-control-lg, .form-select-lg, .btn-lg {
    line-height: 1.5;
}

/* Form validation alignment */
.invalid-feedback, .valid-feedback {
    margin-top: 8px;
    font-size: 14px;
    display: block;
}

.form-control.is-invalid + .invalid-feedback,
.form-select.is-invalid + .invalid-feedback {
    display: block;
}

.form-control.is-valid + .valid-feedback,
.form-select.is-valid + .invalid-feedback {
    display: block;
}

/* Validation Styles */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    color: #dc3545;
}

.valid-feedback {
    color: #28a745;
}

/* Action Buttons */
.form-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 30px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Help Section Cards */
.card.border-info, .card.border-warning {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card.border-info:hover, .card.border-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header.bg-info.bg-opacity-10 {
    background-color: rgba(23, 162, 184, 0.1) !important;
}

.card-header.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Priority Guide */
.priority-item {
    padding: 20px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.priority-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.priority-icon {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Character Counter */
#charCount {
    font-weight: 600;
    color: #007bff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .create-ticket-section {
        padding: 60px 0;
    }
    
    .ticket-icon {
        padding: 15px;
    }
    
    .ticket-icon i {
        font-size: 2rem !important;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 30px 20px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .form-actions .row {
        text-align: center;
    }
    
    .form-actions .col-md-6:first-child {
        margin-bottom: 15px;
    }
    
    .priority-item {
        margin-bottom: 20px;
    }
}

/* Loading State */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease;
}

/* Custom Scrollbar for Textarea */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Attachment Styles */
.attachments-list {
    margin: 0;
    padding: 0;
}

.attachment-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef !important;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    background-color: #e9ecef;
    border-color: #007bff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.attachment-item .fa-file-o {
    color: #6c757d;
}

.attachment-item .fw-bold {
    color: #07294D;
    font-size: 14px;
}

.attachment-item .text-muted {
    font-size: 12px;
}

.attachment-item .btn-outline-primary {
    border-radius: 20px;
    font-size: 12px;
    padding: 6px 12px;
}

.attachment-item .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    transform: translateY(-1px);
}

/* File Type Icons */
.attachment-item .fa-file-o {
    font-size: 1.5rem;
}

/* Responsive Attachments */
@media (max-width: 768px) {
    .attachment-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .attachment-item .btn-outline-primary {
        margin-top: 10px;
        align-self: flex-end;
    }
} 