/* =============================================================================
   Modal Details Component - Generic Styles
   Reusable styles for all details modals
   ========================================================================== */

/* Statistics cards */
.modal-details-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-details-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Generic modal stats cards */
.modal .card.border-0.bg-light {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal .card.border-0.bg-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Progress bar styling */
.modal-details-progress {
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
}

.modal-details-progress .progress-bar {
    transition: width 0.6s ease;
}

.modal .progress {
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
}

.modal .progress-bar {
    transition: width 0.6s ease;
}

/* Field labels */
.modal-details-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.modal .form-label.text-muted.small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Field values */
.modal-details-value {
    font-size: 0.95rem;
}

.modal .fw-semibold {
    font-size: 0.95rem;
}

/* Status badges */
.modal-details-badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
}

.modal .badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
}

/* Alert sections */
.modal-details-alert {
    border-left: 4px solid;
}

.modal-details-alert.alert-danger {
    border-left-color: #dc3545;
}

.modal-details-alert.alert-warning {
    border-left-color: #ffc107;
}

.modal-details-alert.alert-info {
    border-left-color: #0dcaf0;
}

.modal .alert-danger {
    border-left: 4px solid #dc3545;
}

/* Loading state */
.modal-details-loading .spinner {
    animation: spin 1s linear infinite;
}

[id$="-loading"] .fi-rs-spinner-alt,
[id$="-loading"] .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.modal-details-error {
    text-align: center;
    padding: 3rem 1rem;
}

/* Modal scrollbar */
.modal-dialog-scrollable .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #e9ecef;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

/* Section separators */
.modal-details-separator {
    margin: 1.5rem 0;
    border-top: 1px solid #dee2e6;
}

/* Optional sections (hidden by default, shown when data available) */
[data-optional] {
    display: none;
}

[data-optional].has-data {
    display: block;
}

/* Icon sizes */
.modal-details-icon {
    font-size: 1.25rem;
}

.modal-details-icon-lg {
    font-size: 2rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .modal-details-card {
        margin-bottom: 0.75rem;
    }
    
    .modal-details-label {
        font-size: 0.7rem;
    }
    
    .modal-details-value {
        font-size: 0.9rem;
    }
}

/* Stat number emphasis */
.modal-details-stat {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.modal .fs-4.fw-bold {
    font-size: 1.5rem !important;
    line-height: 1.2;
}

/* Hover effects for interactive elements */
.modal-details-link:hover {
    text-decoration: underline;
}

/* Timeline items */
.modal-details-timeline-item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-details-timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0d6efd;
}

/* Info boxes */
.modal-details-info-box {
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
}

.modal-details-info-box.warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.modal-details-info-box.success {
    border-left-color: #198754;
    background-color: #d1e7dd;
}

.modal-details-info-box.danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.modal[data-modal-details] + .modal-backdrop {
  opacity: 0 !important;
}

/* =============================================================================
   Delete Confirmation Modal
   ========================================================================== */

.delete-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(var(--bs-danger-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================================
   Form Improvements for Modals
   ========================================================================== */

.modal .form-text {
    font-size: 0.75rem;
}

.modal .input-group-text {
    background-color: var(--bs-light);
}

/* Form switch styling */
.modal .form-check.form-switch .form-check-label {
    cursor: pointer;
}

/* Character counter */
.modal .form-text #charCount {
    font-weight: 600;
}

/* =============================================================================
   Quick Links Cards (Input module)
   ========================================================================== */

.card-hover {
    transition: all 0.2s ease;
    color: inherit;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   Input Category Cards (Index)
   ========================================================================== */

.input-category-card {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.input-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--bs-primary);
}
