/* ===================================
   Post-Sale Section - Custom Styles
   =================================== */

/* Card Components */
.detail-card {
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Card Border States */
.border-success {
    border-left: 5px solid #28a745 !important;
}

.border-warning {
    border-left: 5px solid #ffc107 !important;
}

.border-info {
    border-left: 5px solid #17a2b8 !important;
}

.border-secondary {
    border-left: 5px solid #6c757d !important;
}

.border-danger {
    border-left: 5px solid #dc3545 !important;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
}

.info-value {
    color: #212529;
    text-align: right;
    font-size: 0.95rem;
}

/* Payment Details */
.payment-details {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Activity Calendar Legend */
.activity-legend {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-item i {
    font-size: 1.25rem;
}

/* Syncfusion Schedule Customizations */
.e-schedule .e-vertical-view .e-time-cells-wrap table td,
.e-schedule .e-vertical-view .e-work-cells {
    height: 50px;
}

/* Activity Type Colors for Calendar Events */
.activity-paymentverification {
    background-color: #28a745 !important;
    border-left: 4px solid #1e7e34 !important;
    color: white !important;
}

.activity-officeappointment {
    background-color: #007bff !important;
    border-left: 4px solid #0056b3 !important;
    color: white !important;
}

.activity-customercall {
    background-color: #ffc107 !important;
    border-left: 4px solid #d39e00 !important;
    color: #212529 !important;
}

.activity-technicalmeasurement {
    background-color: #dc3545 !important;
    border-left: 4px solid #bd2130 !important;
    color: white !important;
}

.activity-customersatisfaction {
    background-color: #17a2b8 !important;
    border-left: 4px solid #117a8b !important;
    color: white !important;
}

.activity-erpconfirmation {
    background-color: #6f42c1 !important;
    border-left: 4px solid #59339d !important;
    color: white !important;
}

.activity-other {
    background-color: #6c757d !important;
    border-left: 4px solid #545b62 !important;
    color: white !important;
}

/* Completed Activities Styling */
.activity-completed {
    opacity: 0.6 !important;
    font-style: italic;
}

.activity-completed::after {
    content: " ✓";
    font-weight: bold;
}

/* Purple Header for Calendar */
.bg-purple {
    background-color: #7b3f99 !important;
}

/* Modal Styles */
.satisfaction-buttons .btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    transition: all 0.2s;
}

.satisfaction-buttons .btn:hover {
    transform: scale(1.05);
}

.satisfaction-buttons .btn i {
    font-size: 2rem;
    transition: transform 0.2s;
}

.satisfaction-buttons .btn:hover i {
    transform: scale(1.1);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Status Badges Enhancement */
.status-badge-large {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

/* Progress Bar Enhancements for Variance */
.progress {
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    font-weight: 600;
    transition: width 0.6s ease;
}

/* Alert Enhancements */
.alert {
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #28a745;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-info {
    border-left-color: #17a2b8;
}

/* List Group Enhancements */
.list-group-item {
    transition: background-color 0.2s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Button Group Spacing */
.btn-group-sm .btn {
    margin-right: 0.25rem;
}

.btn-group-sm .btn:last-child {
    margin-right: 0;
}

/* Form Controls Enhancement */
.form-control:focus,
.form-select:focus {
    border-color: #7b3f99;
    box-shadow: 0 0 0 0.2rem rgba(123, 63, 153, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .detail-card {
        margin-bottom: 1rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }

    .info-value {
        text-align: left;
        margin-top: 0.25rem;
    }

    .satisfaction-buttons {
        flex-direction: column;
    }

    .satisfaction-buttons .btn {
        min-width: 100%;
    }

    .activity-legend {
        padding: 0.75rem;
    }

    .legend-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .e-schedule {
        font-size: 0.875rem;
    }

    .e-schedule .e-vertical-view .e-time-cells-wrap table td,
    .e-schedule .e-vertical-view .e-work-cells {
        height: 40px;
    }
}

/* Print Styles */
@media print {
    .detail-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }

    .btn,
    .modal,
    .activity-legend {
        display: none;
    }

    .e-schedule {
        max-height: none !important;
    }
}

/* Accessibility Enhancements */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid #7b3f99;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

/* Prevent transition on page load */
.no-transition {
    transition: none !important;
}
