/* Project Tracking Styles */

/* Project Modal Styles */
.project-modal {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    padding: 2rem;
    background: var(--background-color);
}

/* Full screen modal close button */
.project-modal .modal-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1002;
}

.project-modal .modal-close-btn:hover {
    background: var(--primary-color-start);
    color: white;
    border-color: var(--primary-color-start);
}

/* Override modal overlay for project modal */
.project-modal-overlay {
    background-color: var(--background-color) !important;
    backdrop-filter: none !important;
}

.project-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.project-header h2 {
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    gap: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Milestone Tracker Styles */
.milestone-tracker {
    margin: 2rem 0;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.milestone-list {
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    min-width: max-content;
}

.milestone-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 120px;
    padding: 0 0.5rem;
    text-align: center;
}

.milestone-item:last-child {
    margin-right: 0;
}

/* Connecting line between milestones */
.milestone-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(50% + 20px);
    top: 20px;
    width: calc(100% - 40px);
    height: 2px;
    background-color: var(--border-color);
    z-index: -1;
}

.milestone-item.completed:not(:last-child)::after {
    background-color: var(--success-color);
}

.milestone-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.milestone-item.completed .milestone-icon {
    background-color: var(--success-color);
    color: white;
}

.milestone-item.active .milestone-icon {
    background-color: var(--primary-color-start);
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.milestone-content {
    max-width: 150px;
}

.milestone-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.milestone-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

.milestone-date {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* Project Details Section */
.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-weight: 600;
    color: var(--text-color);
}

/* File Upload Section */
.file-section {
    margin: 2rem 0;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.file-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary-color-start);
    transform: translateY(-2px);
}

.file-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-name {
    font-size: 0.8rem;
    color: #6b7280;
    word-break: break-all;
}

/* Photo Restoration Cards */
.photo-restoration-section {
    margin: 2rem 0;
}

.photo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.photo-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.photo-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.photo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.photo-preview {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.photo-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photo-field {
    display: flex;
    flex-direction: column;
}

.photo-field label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.photo-field textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: vertical;
    min-height: 80px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.photo-field input[type="number"] {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 120px;
}

.photo-field textarea:focus,
.photo-field input:focus {
    outline: none;
    border-color: var(--primary-color-start);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.photo-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.photo-number {
    background: var(--primary-color-start);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Supporting Documents Section */
.supporting-docs-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.supporting-docs-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.supporting-docs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.supporting-doc-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.supporting-doc-item:hover {
    border-color: var(--primary-color-start);
    transform: translateY(-2px);
}

.supporting-doc-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.supporting-doc-name {
    font-size: 0.75rem;
    color: #6b7280;
    word-break: break-all;
}

/* Price summary */
.price-summary {
    background: var(--primary-color-start);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

.price-summary h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Admin Job Ticket Styles */
.job-ticket {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Admin file section */
.admin-files-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.admin-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.admin-file-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.admin-file-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.admin-file-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #e5e7eb;
}

.admin-file-icon {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
}

.admin-file-icon i {
    width: 48px;
    height: 48px;
}

.admin-file-info {
    padding: 1rem;
}

.admin-file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-file-instruction {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.admin-file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
}

.photo-details-admin {
    margin-top: 2rem;
}

.photo-detail-card {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.photo-detail-card strong {
    color: #1f2937;
    display: block;
    margin-bottom: 0.5rem;
}

.photo-detail-card p {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
}

.price-tag {
    display: inline-block;
    background: var(--primary-color-start);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.job-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.job-ticket-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color-start);
}

.job-ticket-status {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.job-ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.job-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-field label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.job-field input,
.job-field select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.job-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.job-actions button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Progress buttons for admin */
.progress-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.progress-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.progress-btn:hover {
    background-color: var(--primary-color-start);
    color: white;
    border-color: var(--primary-color-start);
}

.progress-btn.active {
    background-color: var(--primary-color-start);
    color: white;
    border-color: var(--primary-color-start);
}

/* Clickable project items */
.project-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-modal {
        padding: 1rem;
    }
    
    .project-modal .modal-close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .job-ticket-grid {
        grid-template-columns: 1fr;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
    
    .milestone-list {
        justify-content: flex-start;
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .milestone-item {
        min-width: 100px;
        flex: 0 0 auto;
    }
    
    .milestone-content {
        max-width: 100px;
    }
    
    .milestone-title {
        font-size: 0.8rem;
    }
    
    .milestone-description {
        font-size: 0.7rem;
    }
    
    .photo-cards {
        grid-template-columns: 1fr;
    }
    
    .photo-card {
        padding: 1rem;
    }
    
    .photo-preview {
        height: 150px;
    }
    
    .supporting-docs-section {
        padding: 1rem;
    }
    
    .supporting-docs-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .supporting-doc-item img {
        height: 60px;
    }
}