/* Goal Details Page Styles */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #0d6efd;
}

/* Goal Header */
.goal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #0d6efd;
}

.goal-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.goal-description {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* View Toggle Buttons */
.view-toggle-container {
    margin-bottom: 1.5rem;
}

.view-toggle-btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
}

.view-toggle-btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Objective Cards */
.objective-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.objective-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.objective-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.objective-card .card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.objective-card .card-text {
    color: #6c757d;
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Progress Bars */
.kpi-progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
    margin-bottom: 1rem;
}

.kpi-progress .progress-bar {
    transition: width 0.6s ease;
}

/* Action Buttons */
.action-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    min-width: 300px;
}

.toast {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Form Controls */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .goal-header {
        padding: 1rem;
    }
    
    .objective-card {
        margin-bottom: 1rem;
    }
    
    .view-toggle-container {
        margin-bottom: 1rem;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Custom scrollbar for modal content */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status colors */
.status-active {
    background-color: #198754;
    color: white;
}

.status-inactive {
    background-color: #6c757d;
    color: white;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

/* Priority badges */
.priority-high {
    background-color: #dc3545;
    color: white;
}

.priority-medium {
    background-color: #fd7e14;
    color: white;
}

.priority-low {
    background-color: #20c997;
    color: white;
}

/* Custom checkbox */
.custom-checkbox .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Custom radio buttons */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Hover effects for table rows */
tbody tr {
    transition: background-color 0.15s ease-in-out;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Custom dropdown menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-divider {
    margin: 0.25rem 0;
}

/* Responsive table */
/*.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}*/

.table thead th {
    background-color: #f8f9fa;
    border-bottom-width: 1px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* Custom file input */
.custom-file-upload {
    border: 1px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.custom-file-upload:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}
