/* Case Tracking System Styles */

/* Main container for tracking page */
.tracking-container {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background-color: var(--clr-bg);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-image: linear-gradient(120deg, rgba(52, 152, 219, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%);
}

/* Responsive padding for mobile */
@media (max-width: 767px) {
    .tracking-container {
        padding: 40px 10px;
    }
}

/* Optional subtle background pattern */
.tracking-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(120deg, rgba(52, 152, 219, 0.03) 0%, rgba(44, 62, 80, 0.03) 100%);
    z-index: -1;
}

/* Case tracking card styles */
.tracking-card {
    background-color: var(--clr-surface);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(222, 226, 230, 0.3);
    overflow-x: hidden;
    position: relative;
}

/* Responsive card styles for mobile */
@media (max-width: 767px) {
    .tracking-card {
        border-radius: 12px;
        margin: 0;
        width: 100%;
    }
    
    .tracking-card:hover {
        transform: none;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
}

.tracking-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.client-card .card-header, .case-info-card .card-header, .details-card .card-header {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
    color: white;
    padding: 18px 22px;
    font-weight: 600;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.client-card .card-header::before, .case-info-card .card-header::before, .details-card .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.client-card:hover .card-header::before, .case-info-card:hover .card-header::before, .details-card:hover .card-header::before {
    left: 100%;
}

.tracking-card .card-header h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-underline {
    height: 3px;
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    margin: 10px auto 0;
    border-radius: 2px;
}

.tracking-card .card-body {
    padding: 40px;
    width: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    background-color: rgba(255, 255, 255, 0.98);
}

@media (max-width: 767px) {
    .tracking-card .card-body {
        padding: 20px 15px;
    }
}

/* Case ID Display Styles */
.case-id-container {
    text-align: center;
    margin: 30px 0;
}

.case-id-box {
    background-color: var(--clr-surface);
    border: 2px solid var(--clr-accent);
    border-radius: 12px;
    padding: 25px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.15);
    position: relative;
    overflow: hidden;
}

@media (max-width: 767px) {
    .case-id-box {
        padding: 20px 15px;
        margin: 15px auto;
        border-radius: 8px;
    }
}

.case-id-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--clr-accent);
}

.case-id {
    font-size: 26px;
    font-weight: 700;
    color: var(--clr-accent);
    letter-spacing: 1.2px;
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(52, 152, 219, 0.08);
    border-radius: 6px;
    margin: 0 5px;
    border: 1px dashed rgba(52, 152, 219, 0.3);
    position: relative;
}

.case-id::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.5), transparent);
}

.case-id-note {
    font-style: italic;
    color: var(--clr-secondary);
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.5;
}

/* Case Tracking Form Styles */
/* Tracking Intro and Form Styles */
.tracking-intro {
    text-align: center;
    margin-bottom: 30px;
}

.tracking-icon-container {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tracking-icon {
    font-size: 32px;
    color: white;
}

.tracking-intro-text {
    color: var(--clr-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
}

.tracking-form-container {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    margin: 30px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tracking-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, transparent 45%, rgba(var(--clr-primary-rgb), 0.05) 100%);
    border-radius: 0 0 0 100%;
    z-index: 0;
}

@media (max-width: 767px) {
    .tracking-form-container {
        padding: 25px 15px;
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .tracking-form-container:hover {
        transform: none;
    }
}

.tracking-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}

.track-case-form {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
}

.track-case-form .form-group {
    margin-bottom: 25px;
}

.track-case-form label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--clr-primary);
    display: block;
    font-size: 17px;
}

.track-case-form .form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 14px 18px;
    height: auto;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.9);
}

.track-case-form .form-control:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    background-color: #fff;
    outline: none;
}

.track-case-form .input-group-text {
    background-color: var(--clr-primary);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    width: 50px;
    display: flex;
    justify-content: center;
    font-size: 18px;
}

.track-btn {
    padding: 12px 30px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Case Status and Details */
.case-status {
    font-size: 18px;
    font-weight: bold;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
}

/* Case Details Styling */
.case-details-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.case-id-badge {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
    color: white;
    border-radius: 10px;
    padding: 10px 18px;
    margin-right: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-5px);
}

.case-number {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-summary {
    margin-bottom: 30px;
}

.status-timestamp {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 15px;
    text-align: right;
}

.case-details-timeline {
    position: relative;
    padding-left: 20px;
    width: 100%;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--clr-primary), var(--clr-accent));
    border-radius: 3px;
    opacity: 0.3;
}

.timeline-content {
    width: 100%;
}

.timeline-content .row {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 25px;
    justify-content: space-between;
}

.timeline-content .col-md-6 {
    flex: 1;
    min-width: 0;
}

/* Info Items Styling */
.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-icon {
    font-size: 18px;
    color: var(--clr-primary);
    margin-right: 18px;
    background: rgba(52, 152, 219, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.info-item:hover .info-icon {
    transform: scale(1.1);
    background-color: rgba(52, 152, 219, 0.15);
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 14px;
    color: var(--clr-text-secondary);
    margin-bottom: 5px;
}

.info-value {
    font-weight: 600;
    color: var(--clr-text);
    font-size: 16px;
}

.evidence-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.evidence-yes {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.evidence-no {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Progress Stages */
.progress-stages {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Responsive progress stages for mobile */
@media (max-width: 767px) {
    .progress-stages {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Firefox */
    }
    
    .progress-stages::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
}

.stage {
    text-align: center;
    flex: 1;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .stage {
        flex: 0 0 auto;
        min-width: 80px;
        margin-right: 15px;
        scroll-snap-align: start;
    }
    
    .stage:last-child {
        margin-right: 0;
    }
}

.stage.active {
    opacity: 1;
}

.stage-icon {
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 2px solid #dee2e6;
    font-size: 20px;
    color: var(--clr-text-secondary);
    transition: all 0.3s ease;
}

.stage.active .stage-icon {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stage-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--clr-text-secondary);
}

.stage.active .stage-label {
    color: var(--clr-text);
}

.next-steps {
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    padding: 15px 20px;
    border-left: 4px solid var(--clr-primary);
}

/* Action Buttons */
.action-buttons {
    margin: 30px 0;
}

.action-btn-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 991px) {
    .action-btn-container {
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .action-btn-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.action-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

@media (max-width: 991px) {
    .action-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .action-btn i {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .action-btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
    }
    
    .action-btn i {
        font-size: 16px;
    }
}

/* Case info grid */
.case-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Make case and client info boxes vertical on mobile */
@media (max-width: 767px) {
    .case-details-timeline .row {
        display: flex;
        flex-direction: column;
    }
    
    .case-details-timeline .row .col-md-6 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
}

/* Print styles */
@media print {
    footer, .footer, #footer {
        display: none !important;
    }
    
    .action-buttons {
        display: none !important;
    }
    
    .tracking-container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .tracking-card {
        box-shadow: none !important;
    }
    
    .tracking-card .card-body {
        padding: 10px 0 !important;
    }
    
    body {
        background: white !important;
    }
    
    .header-container {
        display: none !important;
    }
    
    .case-id-box {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 10px;
    padding: 20px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
}

.alert-info::before {
    background-color: #17a2b8;
}

.alert-primary::before {
    background-color: #007bff;
}

.alert-success::before {
    background-color: #28a745;
}

.alert-heading {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.alert-info .alert-heading::before {
    content: '\f05a'; /* Info icon */
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    color: #17a2b8;
}

.alert-primary .alert-heading::before {
    content: '\f2f1'; /* Refresh icon */
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    color: #007bff;
}

.alert-success .alert-heading::before {
    content: '\f00c'; /* Check icon */
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    color: #28a745;
}

/* Card styling */
.client-card, .case-info-card, .details-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.client-card:hover, .case-info-card:hover, .details-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.09);
}

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

.card .card-header {
    background: linear-gradient(to right, rgba(52, 152, 219, 0.1), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(222, 226, 230, 0.5);
    padding: 18px 25px;
    font-weight: 600;
    color: var(--clr-primary);
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
}

.card .card-header h4 {
    margin: 0;
    font-size: 18px;
}

.card .card-header h4::before {
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    opacity: 0.8;
}

.card .card-header h4.client-info::before {
    content: '\f007'; /* User icon */
}

.card .card-header h4.case-info::before {
    content: '\f15c'; /* File icon */
}

.card .card-header h4.recovery-progress::before {
    content: '\f201'; /* Chart icon */
}

.card .card-body {
    padding: 25px;
}

.card .card-body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.card .card-body p:last-child {
    margin-bottom: 0;
}

.card .card-body p strong {
    color: var(--clr-primary);
    font-weight: 600;
    margin-right: 5px;
}

/* Progress Bar */
.progress {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 15px 0;
    background-color: #f5f5f5;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: width 1.8s ease;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(45deg, 
                      rgba(255, 255, 255, 0.15) 25%, 
                      transparent 25%, 
                      transparent 50%, 
                      rgba(255, 255, 255, 0.15) 50%, 
                      rgba(255, 255, 255, 0.15) 75%, 
                      transparent 75%, 
                      transparent);
    background-size: 40px 40px;
    animation: progress-bar-stripes 2s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 40px 0; }
    to { background-position: 0 0; }
}

/* Helpful Tips Section */
#tracking-tip {
    border: none;
    border-radius: 12px;
    background-color: rgba(255, 193, 7, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 35px;
}

#tracking-tip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: #ffc107;
}

#tracking-tip:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.15);
}

#tracking-tip .card-header {
    background-color: transparent;
    border-bottom: 1px dashed rgba(255, 193, 7, 0.3);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#tracking-tip .card-header h5 {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #856404;
}

#tracking-tip .card-header h5 i {
    margin-right: 10px;
    font-size: 20px;
}

#tracking-tip .card-body {
    padding: 22px 25px;
}

#tracking-tip ul {
    padding-left: 20px;
}

#tracking-tip ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 5px;
    line-height: 1.6;
    color: #6c757d;
}

#tracking-tip ul li:last-child {
    margin-bottom: 0;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: -2;
}

.btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-accent) 0%, #2980b9 100%);
    border-color: var(--clr-accent);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, var(--clr-accent) 100%);
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--clr-secondary) 0%, #7f8c8d 100%);
    border-color: var(--clr-secondary);
    box-shadow: 0 4px 15px rgba(93, 109, 126, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, var(--clr-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(93, 109, 126, 0.35);
}

.btn-outline-dark {
    border: 2px solid #495057;
    color: #495057;
    background: transparent;
}

.btn-outline-dark:hover {
    background-color: #495057;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(73, 80, 87, 0.2);
}

.btn-outline-secondary {
    border: 1px solid var(--clr-secondary);
    color: var(--clr-secondary);
    background: transparent;
    padding: 5px 12px;
    font-size: 14px;
}

.btn-outline-secondary:hover {
    background-color: var(--clr-secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(93, 109, 126, 0.2);
}

/* Print Styles */
@media print {
    .header-container, .footer, #tracking-tip, .btn {
        display: none !important;
    }
    
    .tracking-container {
        padding: 0;
        min-height: auto;
    }
    
    .tracking-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .case-id {
        font-size: 20px;
    }
    
    .case-id-box {
        padding: 15px;
    }
    
    .tracking-card .card-body {
        padding: 20px 15px;
    }
    
    .tracking-container {
        padding: 20px 10px;
    }
}
