/**
 * Box Integration Styles - Compact Layout
 */

/* Container */
.box-integration-container {
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    border: 1px solid #d1e3f6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* Connect Section - Inline Layout */
.box-connect-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon */
.box-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0061d5 0%, #0073e6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.box-icon-connected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.box-icon-synced {
    background: linear-gradient(135deg, #0a3b52 0%, #0f607c 100%);
}

/* Content area */
.box-connect-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.box-connect-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.box-connect-content strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.box-connect-content p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

/* Inline actions */
.box-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Connect Button */
.box-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #0061d5 0%, #0073e6 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.box-connect-btn:hover {
    background: linear-gradient(135deg, #0052b8 0%, #0061d5 100%);
    box-shadow: 0 4px 12px rgba(0, 97, 213, 0.25);
}

/* Select Folder Button */
.box-select-folder-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.box-select-folder-btn:hover {
    background: #1e293b;
}

/* Sync Now Button */
.box-sync-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #0a3b52 0%, #0f607c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.box-sync-now-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #082f42 0%, #0a4d63 100%);
}

.box-sync-now-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Small icon buttons */
.box-change-folder-btn,
.box-disconnect-btn {
    background: none;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.box-change-folder-btn:hover {
    background: #f1f5f9;
    color: #0061d5;
    border-color: #cbd5e1;
}

.box-disconnect-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Progress bar */
.box-sync-progress {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.box-progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.box-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0061d5 0%, #10b981 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.box-progress-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    text-align: right;
}

/* Folder Picker Modal */
.box-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.box-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.box-picker-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    max-height: 70vh;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.box-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.box-picker-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.box-picker-header h3 i {
    color: #0061d5;
}

.box-picker-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.box-picker-close:hover {
    color: #64748b;
}

/* Breadcrumb */
.box-picker-breadcrumb {
    padding: 10px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.box-breadcrumb-item {
    color: #0061d5;
    cursor: pointer;
}

.box-breadcrumb-item:hover {
    text-decoration: underline;
}

.box-breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

.box-picker-breadcrumb i.fa-chevron-right {
    font-size: 9px;
    color: #cbd5e1;
}

/* Picker Body */
.box-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 18px;
    min-height: 200px;
    max-height: 300px;
}

.box-picker-loading {
    text-align: center;
    padding: 30px;
    color: #64748b;
}

.box-picker-loading i {
    font-size: 20px;
    color: #0061d5;
    margin-bottom: 6px;
    display: block;
}

.box-picker-empty {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
}

.box-picker-error {
    text-align: center;
    padding: 30px;
    color: #dc2626;
}

/* Folder Items */
.box-folder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 3px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.box-folder-item:hover {
    background: #e0f2fe;
    border-color: #0061d5;
}

.box-folder-item i.fa-folder {
    color: #fbbf24;
    font-size: 16px;
}

.box-folder-item span {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
}

.box-folder-arrow {
    color: #94a3b8;
    font-size: 11px;
}

.box-file-count {
    padding: 10px 12px;
    margin-top: 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
}

.box-file-count i {
    color: #94a3b8;
    margin-right: 5px;
}

/* Picker Footer */
.box-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.box-picker-info {
    font-size: 12px;
    color: #64748b;
}

.box-picker-info strong {
    color: #1e293b;
}

.box-select-this-folder-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.box-select-this-folder-btn:hover {
    background: #059669;
}

/* Notices */
.box-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box-notice-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.box-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.box-notice-info {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

.box-notice-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    padding: 0;
}

.box-notice-close:hover {
    opacity: 1;
}

/* Loading state */
.box-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: #64748b;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .box-connect-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .box-inline-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .box-picker-content {
        width: 95%;
        max-height: 85vh;
    }

    .box-picker-footer {
        flex-direction: column;
        gap: 10px;
    }
}
