/* Container */
.dxo-container {
    max-width: 100%;
    margin: 8px;
    padding: 4px;
    background: #fff;
}

/* Main Layout */
.dxo-main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Controls Row */
.dxo-controls-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

/* Groups */
.dxo-group-upload {
    flex: 0 0 auto;
}

.dxo-group-files {
    flex: 1 1 200px;
    min-width: 200px;
}

.dxo-group-name {
    flex: 1 1 200px;
    min-width: 200px;
}

.dxo-group-date {
    flex: 0 0 140px;
}

.dxo-group-weeks {
    flex: 0 0 80px;
}

.dxo-group-generate {
    flex: 0 0 auto;
}

/* Upload Section */
.dxo-upload-section {
    flex: 0 0 auto;
}

.dxo-upload-btn {
    height: 32px;
}

.dxo-file-input {
    display: none;
}

/* Files Section */
.dxo-files-section {
    flex: 0 0 auto;
}

.dxo-files-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Option Groups - Better Label Structure */
.dxo-option-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.dxo-option-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dxo-option-group .dashicons {
    color: #666;
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-top: 0;
}

/* Select and Input Styles */
.dxo-select,
.dxo-datepicker,
.dxo-number-input {
    height: 30px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.dxo-number-input {
    text-align: center;
}

/* Files select styling */
.dxo-input-files {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    min-width: 200px;
}

/* Buttons */
.dxo-button {
    padding: 6px 12px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-sizing: border-box;
}

.dxo-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dxo-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dxo-button-primary {
    background: #0073aa;
    color: white;
}

.dxo-button-danger {
    background: #dc3545;
    color: white;
}

.dxo-button-success {
    background: #28a745;
    color: white;
}

/* Status Messages */
.dxo-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
    font-size: 13px;
}

.dxo-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dxo-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dxo-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Spinner */
.dxo-loading {
    display: none;
    align-items: center;
    margin-left: 8px;
}

.dxo-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dialog Styles */
.dxo-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dxo-dialog-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dxo-dialog-content h3 {
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dxo-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dxo-controls-row {
        flex-wrap: wrap;
    }
    
    .dxo-group-date,
    .dxo-group-weeks {
        flex: 1 1 120px;
    }
}

@media (max-width: 768px) {
    .dxo-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .dxo-group-upload,
    .dxo-group-files,
    .dxo-group-name,
    .dxo-group-date,
    .dxo-group-weeks,
    .dxo-group-generate {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .dxo-files-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dxo-input-files {
        min-width: auto;
        width: 100%;
    }
    
    .dxo-button {
        width: 100%;
        justify-content: center;
    }
}