/* static/css/my_fixes.css */

.my-fixes-wrapper {
    background-color: var(--dark-bg);
    padding: 2.5rem 1.5rem;
    min-height: calc(100vh - 120px);
}

.my-fixes-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: transparent;
    padding: 0;
}

.my-fixes-container h2 {
    color: var(--light-text);
    border-bottom-color: var(--card-border);
}

.my-fixes-container > p {
    color: var(--medium-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

#my-fixes-status-message {
    margin-bottom: 2rem;
}

.fixes-table-container {
    background-color: var(--card-bg);
    color: #111827;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

#my-fixes-table {
    width: 100%;
    border-collapse: collapse;
}

#my-fixes-table thead {
    background-color: #f9fafb;
}

#my-fixes-table th {
    padding: 15px 20px;
    text-align: right;
    font-weight: 700;
    color: #374151;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fix-request-row .main-content-cell {
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.fix-request-row:last-of-type .main-content-cell {
    border-bottom: none;
}

.row-summary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 10px 20px;
    transition: background-color 0.2s ease;
}

.fix-request-row[data-status="completed"]:hover .row-summary-grid {
    background-color: #f3f4f6;
}

tr[data-status="completed"] {
    cursor: pointer;
}

.grid-item {
    display: flex;
    align-items: center;
}

.preview-item { gap: 15px; }
.status-item { justify-content: center; }
.date-item { justify-content: center; }
.actions-item { justify-content: flex-end; gap: 8px; }

.image-comparison { display: flex; gap: 10px; }
.image-container { text-align: center; }
.image-comparison img, .image-comparison .placeholder {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f3f4f6;
}
.image-comparison span { font-size: 0.75rem; color: #6b7280; }
.image-info { font-size: 0.9em; }

/* --- START OF NEW CODE --- */
.fix-details-summary {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
}
.fix-details-summary strong {
    color: #4b5563;
}
/* --- END OF NEW CODE --- */

.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85em;
}
.status-tag.pending { background-color: #fef9c3; color: #854d0e; }
.status-tag.completed { background-color: #dcfce7; color: #166534; }

.actions-cell .button {
    padding: 6px;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    line-height: 1;
}

/* --- Expandable Row Styles --- */
.detail-row {
    display: none; /* Hidden by default */
}

.fix-request-row.expanded + .detail-row {
    display: table-row; /* Show the detail row when the main row is expanded */
}

.fix-request-row.expanded .row-summary-grid {
    background-color: #eef2ff; /* Light indigo background for expanded row */
}

.detail-row td {
    padding: 0;
    border-top: 2px solid #c7d2fe; /* Indigo border */
}

.detail-content-wrapper {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.detail-content-wrapper .comparison-image-container {
    flex: 1;
    text-align: center;
}

.detail-content-wrapper .comparison-image-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
}

/* Cursor Logic */
tr[data-status="pending"] .comparison-thumb {
    cursor: zoom-in;
}

#my-fixes-loading, #my-fixes-empty {
    text-align: center;
    color: var(--medium-text);
    margin-top: 40px;
    padding: 3rem;
    background-color: var(--dark-bg-secondary);
    border: 1px dashed var(--card-border);
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.7;
}

@media (max-width: 767px) {
    #my-fixes-table thead { display: none; }
    .fix-request-row, .detail-row { display: block; margin-bottom: 1rem; }
    .row-summary-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.5rem;
    }
    .grid-item { justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }
    .grid-item:last-child { border-bottom: none; }
    .grid-item::before { content: attr(data-label); font-weight: 700; }
    .preview-item::before { content: "תצוגה"; }
    .status-item::before { content: "סטטוס"; }
    .date-item::before { content: "תאריך"; }
    .actions-item::before { content: "פעולות"; }
    .detail-content-wrapper { flex-direction: column; }
}