/* Claims Edit Page - Collapsible Widget Styles */

/* Disable transitions on page load to prevent animation of initial state */
.no-transition * {
    transition: none !important;
}

/* Claim Information Widget */
.claim-info-collapsible {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.claim-info-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#claim-info-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Vehicle Information Widget */
.vehicle-info-collapsible {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.vehicle-info-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#vehicle-info-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Contacts Widget */
.contacts-collapsible {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.contacts-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#contacts-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Billing Items Widget */
.billing-items-collapsible {
    max-height: 100000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.billing-items-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#billing-items-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Status Widget */
.status-collapsible {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.status-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#status-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Attachments Widget */
.attachments-collapsible {
    max-height: 100000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
    width: 100%;
    box-sizing: border-box;
}

.attachments-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#attachments-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Comments Widget */
.comments-collapsible {
    /* Very large max-height allows natural growth for any number of comments
       while still enabling smooth collapse/expand animation.
       100000px can accommodate hundreds of comments without scrollbars. */
    max-height: 100000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.comments-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#comments-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* AI Analysis Widget */
.ai-analysis-collapsible {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
}

.ai-analysis-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#ai-analysis-toggle:hover {
    color: #0088cc;
    transform: scale(1.1);
}

/* Drag and Drop Upload Zone */
.drag-and-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.drag-and-drop-zone:hover {
    border-color: #0088cc;
    background-color: #f0f8ff;
}

.drag-and-drop-zone.uploader-drag {
    position: relative;
}

/* Text container for drag zone instructions */
.drag-and-drop-zone .dnd-text-container {
    font-size: 16px;
    color: #666;
    line-height: 1.4;
}

.drag-and-drop-zone .dnd-text-container small {
    font-size: 14px;
    color: #999;
}

/* Upload button container - removed drag zone classes */
.upload-button-container {
    text-align: center;
}

.drag-and-drop-zone .browser label {
    display: inline-block;
    margin: 0;
}

.drag-and-drop-zone .browser .btn {
    font-size: 14px;
    padding: 8px 20px;
    font-weight: 500;
    cursor: pointer;
}

.drag-and-drop-zone .browser .btn:hover {
    background-color: #0077b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ============================================
   CHEVRON TOGGLE ICONS - VERTICAL ALIGNMENT
   ============================================ */

/* Wrapper div for chevron icons to ensure vertical centering */
.widget-title-buttons {
    display: flex;
    align-items: center;
    height: 100%;
}

/* All chevron toggle icons */
#claim-info-toggle,
#vehicle-info-toggle,
#contacts-toggle,
#billing-items-toggle,
#status-toggle,
#attachments-toggle,
#comments-toggle,
#ai-analysis-toggle {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* ============================================
   AI SUMMARY MORE/LESS TOGGLE
   ============================================ */

/* Summary content container - add padding at bottom for the toggle link */
.ai-summary-content {
    padding-bottom: 0px;
    position: relative;
}

/* Toggle link styling */
.ai-toggle-link {
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ai-toggle-link:hover {
    opacity: 0.7;
    text-decoration: underline !important;
}

/* Hide detailed version by default */
.ai-summary-detailed {
    margin-top: 8px;
}

/* AI Summary Skeleton Loading State */
.summary-skeleton .skeleton-content {
    padding: 2px 0;
}

.skeleton-line {
    height: 14px;
    margin: 5px 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.95s ease-in-out infinite;
}

/* Card-specific skeleton variants with muted, blended colors */
.skeleton-line-blue {
    /* Blue card (#eff6ff) - use subtle blue-gray gradient */
    background: linear-gradient(90deg, #e8f0fc 25%, #dfe8f8 50%, #e8f0fc 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.95s ease-in-out infinite;
}

.skeleton-line-orange {
    /* Orange card (#fffbf0) - use subtle amber-gray gradient */
    background: linear-gradient(90deg, #fdf8ea 25%, #f9f3e4 50%, #fdf8ea 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.95s ease-in-out infinite;
}

.skeleton-line-green {
    /* Green card (#f0fdf4) - use subtle green-gray gradient */
    background: linear-gradient(90deg, #e9faf0 25%, #e1f7ea 50%, #e9faf0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.95s ease-in-out infinite;
}

.skeleton-line-short {
    height: 12px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.ai-summary-loading-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    color: #6b7280;
    font-size: 13px;
    font-weight: normal;
}

.ai-summary-loading-indicator .fa-spinner {
    font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-line {
        animation: none;
        background: #E0E0E0;
    }

    .ai-summary-loading-indicator .fa-spinner {
        animation: none;
    }
}
