/**
 * Inspection Sheet Master CSS 1.1
 * Tailor Portal - Inspection Module Styles
 *
 * v1.1 (2026-01-06): Comment bubble moved to left, multiline support, no arrow
 */

.tailor-inspection-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tailor-inspection-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Order Header */
.inspection-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: white;
    flex-wrap: wrap;
    gap: 16px;
}

.inspection-order-info h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    background: none !important;
}

.order-meta-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.inspection-order-info .order-date {
    font-size: 14px;
    opacity: 0.8;
}

.inspection-order-info .order-phone {
    font-size: 14px;
    opacity: 0.9;
}

.inspection-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tailor-btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tailor-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Progress Bar */
.inspection-progress-container {
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.inspection-progress-container.has-rejections {
    background: #fef3f2;
}

.inspection-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.progress-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-approved {
    color: #16a34a;
    font-weight: 700;
}

.stat-rejected {
    color: #dc2626;
    font-weight: 700;
}

.stat-total {
    color: #666;
}

.progress-percentage {
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
}

.inspection-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.inspection-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.inspection-progress-fill.has-rejections {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Item Tabs */
.inspection-item-tabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    background: #fff;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.inspection-item-tabs::-webkit-scrollbar { display: none; }

.inspection-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.inspection-tab:hover {
    color: #1a1a2e;
    background: #f8f9fa;
}

.inspection-tab.active {
    color: #1a1a2e;
    border-bottom-color: #f7c948;
}

/* Status badges */
.inspection-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inspection-status-pending {
    background: #fff3e0;
    color: #e65100;
}

.inspection-status-in-progress {
    background: #e3f2fd;
    color: #1565c0;
}

.inspection-status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.inspection-status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

/* Item Content */
.inspection-item-content {
    padding: 24px;
}

/* Measure Remarks Section */
.inspection-measure-remarks-section {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 2px solid #86efac;
    border-left: 4px solid #22c55e;
}

.inspection-measure-remarks-section.has-data {
    background: #dcfce7;
}

.measure-remarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.inspection-measure-remarks-section.has-data .measure-remarks-header,
.inspection-measure-remarks-section:has(.measure-remarks-edit[style*="block"]) .measure-remarks-header {
    margin-bottom: 12px;
}

.measure-remarks-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #166534;
    background: none !important;
}

.measure-remarks-toggle {
    background: transparent;
    border: 2px solid #22c55e;
    color: #15803d;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.measure-remarks-toggle:hover {
    background: #22c55e;
    color: white;
}

.measure-remarks-display {
    background: white;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    overflow: hidden;
}

.measure-remarks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.measure-remarks-table th {
    background: #f0fdf4;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #166534;
    border-bottom: 2px solid #86efac;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notice text styling */
.measure-remarks-notice {
    color: #c0392b;
    font-weight: 600;
    font-size: 0.85em;
    margin-left: 15px;
}

/* Two-line header styling (Chinese + English) */
.measure-remarks-table th .th-cn,
.measure-remarks-table th .th-en {
    display: block;
}

.measure-remarks-table th .th-cn {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 2px;
    text-transform: none;
}

.measure-remarks-table th .th-en {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.measure-remarks-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dcfce7;
    color: #166534;
}

.measure-remarks-table tr:last-child td {
    border-bottom: none;
}

.measure-remarks-table th:nth-child(1),
.measure-remarks-table td:nth-child(1) { width: 25%; }
.measure-remarks-table th:nth-child(2),
.measure-remarks-table td:nth-child(2) { width: 25%; }
.measure-remarks-table th:nth-child(3),
.measure-remarks-table td:nth-child(3) { width: 15%; text-align: center; }
.measure-remarks-table th:nth-child(4),
.measure-remarks-table td:nth-child(4) { width: 15%; text-align: center; }
.measure-remarks-table th:nth-child(5),
.measure-remarks-table td:nth-child(5) { width: 15%; text-align: center; }
.measure-remarks-table th:nth-child(6),
.measure-remarks-table td:nth-child(6) { width: 5%; text-align: center; }

.measure-remarks-edit .measure-remarks-table input[type="text"],
.measure-remarks-edit .measure-remarks-table input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.measure-remarks-edit .measure-remarks-table input:focus {
    outline: none;
    border-color: #22c55e;
}

.measure-remarks-edit .measure-remarks-table input[type="number"] {
    text-align: center;
}

.measure-row-delete {
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.measure-row-delete:hover {
    opacity: 1;
}

.measure-remarks-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.measure-remarks-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.measure-remarks-actions .btn-cancel {
    background: #f5f5f5;
    border: 2px solid #d1d5db;
    color: #666;
}

.measure-remarks-actions .btn-cancel:hover {
    background: #e5e5e5;
}

.measure-remarks-actions .btn-save {
    background: #22c55e;
    border: none;
    color: white;
}

.measure-remarks-actions .btn-save:hover {
    background: #16a34a;
}

/* Measure Indicator (Yellow circle) */
.measure-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #fbbf24;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(251, 191, 36, 0.4);
}

/* Order Remarks Section */
.inspection-order-remarks-section {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #fffbeb;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    border-left: 4px solid #f59e0b;
}

.inspection-order-remarks-section.has-remarks {
    background: #fef3c7;
}

.order-remarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.inspection-order-remarks-section.has-remarks .order-remarks-header,
.inspection-order-remarks-section:has(.order-remarks-edit[style*="block"]) .order-remarks-header {
    margin-bottom: 12px;
}

.order-remarks-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    background: none !important;
}

.order-remarks-toggle {
    background: transparent;
    border: 2px solid #f59e0b;
    color: #b45309;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-remarks-toggle:hover {
    background: #f59e0b;
    color: white;
}

.order-remarks-display {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

.order-remarks-display p {
    margin: 0;
    font-size: 15px;
    color: #78350f;
    line-height: 1.5;
}

.order-remarks-edit textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #fcd34d;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    background: white;
}

.order-remarks-edit textarea:focus {
    outline: none;
    border-color: #f59e0b;
}

.order-remarks-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.order-remarks-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-remarks-actions .btn-cancel {
    background: #f5f5f5;
    border: 2px solid #d1d5db;
    color: #666;
}

.order-remarks-actions .btn-cancel:hover {
    background: #e5e5e5;
}

.order-remarks-actions .btn-save {
    background: #f59e0b;
    border: none;
    color: white;
}

.order-remarks-actions .btn-save:hover {
    background: #d97706;
}

/* Fabric Section - Prominent Display */
.inspection-fabric-section {
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 2px solid #0ea5e9;
}

.inspection-fabric-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0369a1;
    margin: 0 0 16px 0;
    background: none !important;
}

.inspection-fabric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.inspection-fabric-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    border: 2px solid #e5e7eb;
}

.inspection-fabric-placeholder {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 40px;
}

.inspection-fabric-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fabric-name {
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
}

.fabric-sku {
    font-size: 15px;
    color: #0369a1;
    font-family: 'SF Mono', Monaco, monospace;
}

.fabric-material {
    font-size: 13px;
    color: #6b7280;
}

/* Design Checklist Section */
.inspection-checklist-section {
    margin-bottom: 32px;
}

.inspection-checklist-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    background: none !important;
}

.checklist-progress {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-left: auto;
}

/* Design Grid */
.inspection-design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.inspection-design-card {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.inspection-design-card:hover {
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Card status styles */
.inspection-design-card.status-approved {
    border-color: #16a34a;
    background: #f0fdf4;
}

.inspection-design-card.status-rejected {
    border-color: #dc2626;
    background: #fef2f2;
}

.inspection-design-card.status-pending {
    border-color: #e5e7eb;
}

/* Comment Button */
.inspection-comment-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: white;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.inspection-comment-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
    opacity: 1;
    transform: scale(1.1);
}

.inspection-comment-btn.has-note {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    opacity: 1;
}

.inspection-comment-btn.has-note:hover {
    background: #fee2e2;
}

/* Note Bubble - Red speech bubble */
.inspection-note-bubble {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 45px; /* Leave space for comment button */
    padding: 8px 12px;
    background: #dc2626;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    word-wrap: break-word;
}

/* No arrow needed */

.inspection-note-bubble .note-text {
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card with note - add padding for bubble */
.inspection-design-card.has-note .inspection-design-image {
    margin-top: 45px;
}

.inspection-design-card.has-note:not(:has(.inspection-design-image)) .inspection-design-info {
    margin-top: 45px;
}

/* Comment Modal */
.inspection-comment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.inspection-comment-modal.active {
    opacity: 1;
    visibility: visible;
}

.inspection-comment-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.inspection-comment-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.inspection-comment-modal textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.inspection-comment-modal textarea:focus {
    outline: none;
    border-color: #f59e0b;
}

.inspection-comment-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.inspection-comment-modal-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inspection-comment-modal .btn-cancel {
    background: #f5f5f5;
    border: 2px solid #e5e7eb;
    color: #666;
}

.inspection-comment-modal .btn-cancel:hover {
    background: #eee;
}

.inspection-comment-modal .btn-save {
    background: #f59e0b;
    border: none;
    color: white;
}

.inspection-comment-modal .btn-save:hover {
    background: #d97706;
}

.inspection-comment-modal .btn-delete {
    background: #dc2626;
    border: none;
    color: white;
    margin-right: auto;
}

.inspection-comment-modal .btn-delete:hover {
    background: #b91c1c;
}

/* Design Image */
.inspection-design-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.inspection-design-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.inspection-design-card:hover .inspection-design-image img {
    transform: scale(1.05);
}

/* Design Info */
.inspection-design-info {
    padding: 12px;
    text-align: center;
}

.design-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.design-value-cn {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin-bottom: 2px;
}

.design-value-en {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
}

/* Approve/Reject Buttons - STOR AFSTAND mellem knapper */
.inspection-buttons {
    display: flex;
    gap: 60px;
    padding: 16px 24px;
    justify-content: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.inspection-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.inspection-btn-approve {
    color: #9ca3af;
}

.inspection-btn-approve:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

.inspection-btn-approve.active {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.inspection-btn-reject {
    color: #9ca3af;
}

.inspection-btn-reject:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.inspection-btn-reject.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

/* QC Section */
.inspection-qc-section {
    padding: 24px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.inspection-qc-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    background: none !important;
}

.inspection-qc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.inspection-qc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.inspection-qc-card.status-approved {
    border-color: #16a34a;
    background: #f0fdf4;
}

.inspection-qc-card.status-rejected {
    border-color: #dc2626;
    background: #fef2f2;
}

.qc-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.inspection-qc-card .inspection-buttons {
    padding: 0;
    background: transparent;
    border: none;
}

.inspection-qc-card .inspection-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* Embroidery Inspection Section */
.inspection-embroidery-section {
    margin-top: 24px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 12px;
    padding: 20px;
}

.inspection-embroidery-section h4 {
    color: #fff;
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    background: none !important;
}

.inspection-embroidery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.inspection-embroidery-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #e5e7eb;
    transition: all 0.2s ease;
}

.inspection-embroidery-card.status-approved {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.inspection-embroidery-card.status-rejected {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.inspection-embroidery-card.status-pending {
    border-left-color: #f59e0b;
}

.inspection-embroidery-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspection-embroidery-info .embroidery-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inspection-embroidery-info .embroidery-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.inspection-embroidery-card .inspection-buttons {
    padding: 0;
    background: transparent;
    border: none;
    gap: 16px;
}

.inspection-embroidery-card .inspection-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

/* Embroidery Comment Button */
.inspection-embroidery-card {
    position: relative;
}

.embroidery-comment-btn {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: white;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.embroidery-comment-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
    opacity: 1;
    transform: scale(1.1);
}

.embroidery-comment-btn.has-note {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    opacity: 1;
}

/* Embroidery Note Bubble */
.embroidery-note-bubble {
    position: absolute;
    top: -8px;
    left: 24px;
    max-width: 200px;
    padding: 6px 10px;
    background: #dc2626;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    z-index: 9;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.embroidery-note-bubble::before {
    content: '';
    position: absolute;
    top: 8px;
    left: -6px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #dc2626;
}

.inspection-embroidery-card.has-note {
    margin-top: 16px;
}

/* Notes Section */
.inspection-notes-section {
    padding: 24px;
    border-top: 1px solid #eee;
}

.inspection-notes-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    background: none !important;
}

.optional-label {
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

.inspection-notes-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.inspection-notes-section textarea:focus {
    outline: none;
    border-color: #1a1a2e;
}

/* Actions */
.inspection-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.inspection-actions .tailor-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inspection-actions .tailor-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e5e7eb;
}

.inspection-actions .tailor-btn-secondary:hover {
    background: #eee;
    border-color: #ccc;
}

.inspection-actions .tailor-btn-primary {
    background: #16a34a;
    color: #fff;
    border: none;
}

.inspection-actions .tailor-btn-primary:hover:not(:disabled) {
    background: #15803d;
}

.inspection-actions .tailor-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Completed Banner */
.inspection-completed-banner {
    padding: 20px 24px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* Lightbox */
.inspection-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.inspection-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.inspection-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.inspection-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .tailor-inspection-container { padding: 10px; }

    .inspection-order-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .inspection-order-info h3 { font-size: 18px; }

    .inspection-header-actions {
        width: 100%;
    }

    .inspection-header-actions .tailor-btn {
        flex: 1;
    }

    .inspection-item-tabs { padding: 0 16px; }
    .inspection-tab { padding: 12px 16px; font-size: 14px; }
    .inspection-item-content { padding: 16px; }

    .inspection-fabric-card {
        flex-direction: column;
        text-align: center;
    }

    .inspection-design-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .inspection-design-card { border-radius: 10px; }
    .inspection-design-info { padding: 10px; }
    .design-label { font-size: 9px; }
    .design-value-cn { font-size: 13px; }
    .design-value-en { font-size: 11px; }

    .inspection-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .inspection-qc-grid { grid-template-columns: 1fr; }

    /* Embroidery responsive */
    .inspection-embroidery-section { padding: 16px; }
    .inspection-embroidery-grid { grid-template-columns: 1fr; }
    .inspection-embroidery-card { padding: 12px 16px; }
    .inspection-embroidery-info .embroidery-value { font-size: 14px; }
    .inspection-embroidery-card .inspection-btn { width: 36px; height: 36px; font-size: 16px; }

    .inspection-actions {
        flex-direction: column;
        padding: 16px;
    }

    .inspection-actions .tailor-btn { width: 100%; }
}

@media (max-width: 400px) {
    .inspection-design-grid { grid-template-columns: 1fr; }
}

/* Touch devices */
@media (hover: none) {
    .inspection-design-card:active { transform: scale(0.98); }
    .inspection-qc-card:active { transform: scale(0.98); }
    .zoomable-image { touch-action: pinch-zoom; }
}

/* Tab scroll indicator */
.inspection-item-tabs::after {
    content: '';
    flex-shrink: 0;
    width: 24px;
}

@media (max-width: 768px) {
    .inspection-item-tabs::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(90deg, transparent, white);
        pointer-events: none;
        z-index: 1;
    }
}
