/**
 * Office Docs Uploader Modal Styles
 * Matches designs in 008.png (desktop) and 009.png (mobile)
 */

/* Modal Overlay */
.office-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.office-uploader-modal.hidden {
    display: none;
}

.office-uploader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Modal Container */
.office-uploader-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 520px;
    height: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.office-uploader-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.office-uploader-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

/* Content */
.office-uploader-content {
    padding: 16px 24px 24px 24px;
    flex: 1;
    overflow-y: auto;
}

/* Upload Info */
.upload-info {
    text-align: center;
    margin-bottom: 16px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.accepted-types {
    font-weight: 500;
}

.limits {
    color: #999;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 12px 20px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.upload-area:hover {
    border-color: #4285f4;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #4285f4;
    background: #f0f4ff;
}

.upload-left {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

.upload-icon {
    font-size: 18px;
    color: #999;
}

.upload-text {
    font-size: 14px;
    color: #333;
}

.upload-icon-right {
    font-size: 18px;
    color: #999;
}

.mobile-text {
    display: none;
}

.upload-or {
    display: none;
}

.choose-files-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.choose-files-btn:hover {
    background: #3367d6;
}

/* Selected Files Section */
.selected-files-section {
    margin-top: 20px;
}

.selected-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Files List */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: none !important;
    height: 100% !important;
    overflow-y: auto;
}

/* File Item */
.file-item {
    display: flex;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 12px 12px 12px 20px !important;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: left !important;
}

.file-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

/* File Type Icons */
.file-icon.docx {
    background: #4285f4;
}

.file-icon.xlsx {
    background: #0f9d58;
}

.file-icon.pptx {
    background: #ea4335;
}

.file-icon.pdf {
    background: #db4437;
}

.file-icon.doc {
    background: #4285f4;
}

.file-icon.xls {
    background: #0f9d58;
}

.file-icon.ppt {
    background: #ea4335;
}

.file-info {
    flex: 1;
    min-width: 0;
    text-align: left !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
}

.file-name {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.file-action-btn {
    background: none;
    border: none;
    color: #4285f4;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.file-action-btn:hover {
    background: #f0f4ff;
}

.file-action-btn.remove {
    color: #ea4335;
}

.file-action-btn.remove:hover {
    background: #fff0f0;
}

/* Progress Bar */
.file-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.file-progress-bar {
    height: 100%;
    background: #4285f4;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.file-status {
    font-size: 12px;
    margin-top: 4px;
}

.file-status.uploading {
    color: #4285f4;
}

.file-status.completed {
    color: #0f9d58;
}

.file-status.error {
    color: #ea4335;
}

/* Modal Footer */
.office-uploader-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.clear-btn, .upload-btn {
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-width: 160px;
    flex: 1;
    max-width: 180px;
    white-space: nowrap;
}

.clear-btn {
    background: white;
    color: #666;
    border-color: #ddd;
}

.clear-btn:hover {
    background: #f5f5f5;
}

.upload-btn {
    background: #4285f4;
    color: white;
}

.upload-btn:hover:not(:disabled) {
    background: #3367d6;
}

.upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .office-uploader-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .office-uploader-container {
        border-radius: 20px 20px 0 0;
        height: 85vh;
        max-height: none;
        width: 100%;
        margin: 0;
    }
    
    .office-uploader-header {
        padding: 24px 20px 0 20px;
    }
    
    .office-uploader-header h3 {
        font-size: 18px;
    }
    
    .office-uploader-content {
        padding: 16px 20px 20px 20px;
        flex: 1;
    }
    
    .office-uploader-footer {
        padding: 20px 20px 30px 20px;
    }
    
    .upload-area {
        min-height: 80px;
        padding: 20px;
    }
    
    .upload-left {
        margin-left: 0;
        justify-content: center;
    }
    
    .desktop-text {
        display: none;
    }
    
    .mobile-text {
        display: block;
    }
    
    .choose-files-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .file-item {
        padding: 16px 12px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .file-action-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .clear-btn, .upload-btn {
        padding: 16px 32px;
        font-size: 16px;
        min-width: 160px;
        max-width: 180px;
    }
    
    .files-list {
        max-height: none;
        flex: 1;
    }
    
    .selected-files-section {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.office-uploader-container {
    animation: slideUp 0.2s ease-out;
}

/* Drag and Drop States */
.upload-area.drag-over {
    border-color: #4285f4;
    background: #f0f4ff;
}

.upload-area.drag-over .upload-icon {
    color: #4285f4;
}

/* File Type Specific Styles */
.file-item.uploading {
    opacity: 0.8;
}

.file-item.completed {
    background: #f8fff8;
    border-color: #d4edda;
}

.file-item.error {
    background: #fff5f5;
    border-color: #f5c6cb;
}